diff --git a/src/test/regress/expected/test_setup.out b/src/test/regress/expected/test_setup.out new file mode 100644 index 0000000000..bea7a7e265 --- /dev/null +++ b/src/test/regress/expected/test_setup.out @@ -0,0 +1,3 @@ +-- Postgres formerly made the public schema read/write by default, +-- and most of the core regression tests still expect that. +GRANT ALL ON SCHEMA public TO public; diff --git a/src/test/regress/input/tablespace.source b/src/test/regress/input/tablespace.source index cb9774ecc8..c133e73499 100644 --- a/src/test/regress/input/tablespace.source +++ b/src/test/regress/input/tablespace.source @@ -388,7 +388,7 @@ CREATE INDEX k ON testschema.tablespace_acl (c) TABLESPACE regress_tblspace; ALTER TABLE testschema.tablespace_acl OWNER TO regress_tablespace_user2; SET SESSION ROLE regress_tablespace_user2; -CREATE TEMP TABLE tablespace_table (i int) TABLESPACE regress_tblspace; -- fail +CREATE TABLE tablespace_table (i int) TABLESPACE regress_tblspace; -- fail ALTER TABLE testschema.tablespace_acl ALTER c TYPE bigint; REINDEX (TABLESPACE regress_tblspace) TABLE tablespace_table; -- fail REINDEX (TABLESPACE regress_tblspace, CONCURRENTLY) TABLE tablespace_table; -- fail @@ -409,6 +409,3 @@ DROP SCHEMA testschema CASCADE; DROP ROLE regress_tablespace_user1; DROP ROLE regress_tablespace_user2; - --- Rest of this suite can use the public schema freely. -GRANT ALL ON SCHEMA public TO public; diff --git a/src/test/regress/output/tablespace.source b/src/test/regress/output/tablespace.source index e7629d470e..1bbe7e0323 100644 --- a/src/test/regress/output/tablespace.source +++ b/src/test/regress/output/tablespace.source @@ -908,7 +908,7 @@ CREATE TABLE testschema.tablespace_acl (c int); CREATE INDEX k ON testschema.tablespace_acl (c) TABLESPACE regress_tblspace; ALTER TABLE testschema.tablespace_acl OWNER TO regress_tablespace_user2; SET SESSION ROLE regress_tablespace_user2; -CREATE TEMP TABLE tablespace_table (i int) TABLESPACE regress_tblspace; -- fail +CREATE TABLE tablespace_table (i int) TABLESPACE regress_tblspace; -- fail ERROR: permission denied for tablespace regress_tblspace ALTER TABLE testschema.tablespace_acl ALTER c TYPE bigint; REINDEX (TABLESPACE regress_tblspace) TABLE tablespace_table; -- fail @@ -934,5 +934,3 @@ drop cascades to table testschema.atable drop cascades to table testschema.tablespace_acl DROP ROLE regress_tablespace_user1; DROP ROLE regress_tablespace_user2; --- Rest of this suite can use the public schema freely. -GRANT ALL ON SCHEMA public TO public; diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule index 017e962fed..5b0c73d7e3 100644 --- a/src/test/regress/parallel_schedule +++ b/src/test/regress/parallel_schedule @@ -5,7 +5,10 @@ # this limits the number of connections needed to run the tests. # ---------- -# run tablespace by itself, and first, because it forces a checkpoint; +# required setup steps +test: test_setup + +# run tablespace by itself, and early, because it forces a checkpoint; # we'd prefer not to have checkpoints later in the tests because that # interferes with crash-recovery testing. test: tablespace diff --git a/src/test/regress/sql/test_setup.sql b/src/test/regress/sql/test_setup.sql new file mode 100644 index 0000000000..bea7a7e265 --- /dev/null +++ b/src/test/regress/sql/test_setup.sql @@ -0,0 +1,3 @@ +-- Postgres formerly made the public schema read/write by default, +-- and most of the core regression tests still expect that. +GRANT ALL ON SCHEMA public TO public;