Don't use the pg_am system catalog in new test
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2024 11:10:16 +0000 (13:10 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2024 11:10:16 +0000 (13:10 +0200)
This causes deadlocks because it's a highly trafficked catalog.  Use a
regular table created by the same test instead.

Discussion: https://postgr.es/m/f3e61e27-19d0-5e40-3eb2-53282fa0532a@gmail.com

src/test/regress/expected/create_am.out
src/test/regress/sql/create_am.sql

index aa4cb4fa77f9811d0769adba9c9473049d382a65..9762c332ce03ac9085817db7992044e23f950791 100644 (file)
@@ -548,8 +548,8 @@ ERROR:  access method "I do not exist AM" does not exist
 CREATE TABLE i_am_a_failure() USING "btree";
 ERROR:  access method "btree" is not of type TABLE
 -- Other weird invalid cases that cause problems
-CREATE FOREIGN TABLE fp PARTITION OF pg_am DEFAULT SERVER x;
-ERROR:  "pg_am" is not partitioned
+CREATE FOREIGN TABLE fp PARTITION OF tableam_parted_a_heap2 DEFAULT SERVER x;
+ERROR:  "tableam_parted_a_heap2" is not partitioned
 -- Drop table access method, which fails as objects depends on it
 DROP ACCESS METHOD heap2;
 ERROR:  cannot drop access method heap2 because other objects depend on it
index c57a87da4b9c38c71357633a4dbd2ddf6220916b..825aed325e5634b0c3df35825493cf8b8c1ab260 100644 (file)
@@ -349,7 +349,7 @@ CREATE TABLE i_am_a_failure() USING "I do not exist AM";
 CREATE TABLE i_am_a_failure() USING "btree";
 
 -- Other weird invalid cases that cause problems
-CREATE FOREIGN TABLE fp PARTITION OF pg_am DEFAULT SERVER x;
+CREATE FOREIGN TABLE fp PARTITION OF tableam_parted_a_heap2 DEFAULT SERVER x;
 
 -- Drop table access method, which fails as objects depends on it
 DROP ACCESS METHOD heap2;