aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/sql/postgres_fdw.sql
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2025-06-08 17:30:00 +0900
committerEtsuro Fujita <efujita@postgresql.org>2025-06-08 17:30:00 +0900
commit7d4667c6203d0174903a53de9d1730fbec26576b (patch)
tree985f2652a7739f6d68b9a5858949c63452258abf /contrib/postgres_fdw/sql/postgres_fdw.sql
parent73e26cbeb5927053eea4e209e5eda34a30c353f1 (diff)
downloadpostgresql-7d4667c6203d0174903a53de9d1730fbec26576b.tar.gz
postgresql-7d4667c6203d0174903a53de9d1730fbec26576b.zip
Revert "postgres_fdw: Inherit the local transaction's access/deferrable modes."
We concluded that commit e5a3c9d9b is a feature rather than a fix; since it was added after feature freeze, revert it. Reported-by: Fujii Masao <masao.fujii@oss.nttdata.com> Reported-by: Michael Paquier <michael@paquier.xyz> Reported-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/ed2296f1-1a6b-4932-b870-5bb18c2591ae%40oss.nttdata.com
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
-rw-r--r--contrib/postgres_fdw/sql/postgres_fdw.sql78
1 files changed, 0 insertions, 78 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 20a535b99d8..e534b40de3c 100644
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -4201,84 +4201,6 @@ DROP FOREIGN TABLE remote_application_name;
DROP VIEW my_application_name;
-- ===================================================================
--- test read-only and/or deferrable transactions
--- ===================================================================
-CREATE TABLE loct (f1 int, f2 text);
-CREATE FUNCTION locf() RETURNS SETOF loct LANGUAGE SQL AS
- 'UPDATE public.loct SET f2 = f2 || f2 RETURNING *';
-CREATE VIEW locv AS SELECT t.* FROM locf() t;
-CREATE FOREIGN TABLE remt (f1 int, f2 text)
- SERVER loopback OPTIONS (table_name 'locv');
-CREATE FOREIGN TABLE remt2 (f1 int, f2 text)
- SERVER loopback2 OPTIONS (table_name 'locv');
-INSERT INTO loct VALUES (1, 'foo'), (2, 'bar');
-
-START TRANSACTION READ ONLY;
-SAVEPOINT s;
-SELECT * FROM remt; -- should fail
-ROLLBACK TO s;
-RELEASE SAVEPOINT s;
-SELECT * FROM remt; -- should fail
-ROLLBACK;
-
-START TRANSACTION;
-SAVEPOINT s;
-SET transaction_read_only = on;
-SELECT * FROM remt; -- should fail
-ROLLBACK TO s;
-RELEASE SAVEPOINT s;
-SET transaction_read_only = on;
-SELECT * FROM remt; -- should fail
-ROLLBACK;
-
-START TRANSACTION;
-SAVEPOINT s;
-SELECT * FROM remt; -- should work
-SET transaction_read_only = on;
-SELECT * FROM remt; -- should fail
-ROLLBACK TO s;
-RELEASE SAVEPOINT s;
-SELECT * FROM remt; -- should work
-SET transaction_read_only = on;
-SELECT * FROM remt; -- should fail
-ROLLBACK;
-
-START TRANSACTION;
-SAVEPOINT s;
-SELECT * FROM remt; -- should work
-SET transaction_read_only = on;
-SELECT * FROM remt2; -- should fail
-ROLLBACK TO s;
-RELEASE SAVEPOINT s;
-SELECT * FROM remt; -- should work
-SET transaction_read_only = on;
-SELECT * FROM remt2; -- should fail
-ROLLBACK;
-
-DROP FOREIGN TABLE remt;
-CREATE FOREIGN TABLE remt (f1 int, f2 text)
- SERVER loopback OPTIONS (table_name 'loct');
-
-START TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY;
-SELECT * FROM remt;
-COMMIT;
-
-START TRANSACTION ISOLATION LEVEL SERIALIZABLE DEFERRABLE;
-SELECT * FROM remt;
-COMMIT;
-
-START TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE;
-SELECT * FROM remt;
-COMMIT;
-
--- Clean up
-DROP FOREIGN TABLE remt;
-DROP FOREIGN TABLE remt2;
-DROP VIEW locv;
-DROP FUNCTION locf();
-DROP TABLE loct;
-
--- ===================================================================
-- test parallel commit and parallel abort
-- ===================================================================
ALTER SERVER loopback OPTIONS (ADD parallel_commit 'true');