diff --git a/src/test/regress/expected/create_drop_database_propagation.out b/src/test/regress/expected/create_drop_database_propagation.out index b2056d84a..e578cd2eb 100644 --- a/src/test/regress/expected/create_drop_database_propagation.out +++ b/src/test/regress/expected/create_drop_database_propagation.out @@ -1,3 +1,11 @@ +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts3' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; +\c - - - :worker_1_port +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts4' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; +\c - - - :worker_2_port +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts5' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; \c - - - :master_port create user create_drop_db_test_user; set citus.enable_create_database_propagation=on; @@ -8,6 +16,7 @@ CREATE DATABASE mydatabase ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' + TABLESPACE = create_drop_db_tablespace ALLOW_CONNECTIONS = true IS_TEMPLATE = false; SELECT pd.datname, pd.encoding, @@ -18,9 +27,9 @@ FROM pg_database pd JOIN pg_authid pa ON pd.datdba = pa.oid join pg_tablespace pt on pd.dattablespace = pt.oid WHERE datname = 'mydatabase'; - datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace + datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace --------------------------------------------------------------------- - mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | pg_default + mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | create_drop_db_tablespace (1 row) \c - - - :worker_1_port @@ -32,9 +41,9 @@ FROM pg_database pd JOIN pg_authid pa ON pd.datdba = pa.oid join pg_tablespace pt on pd.dattablespace = pt.oid WHERE datname = 'mydatabase'; - datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace + datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace --------------------------------------------------------------------- - mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | pg_default + mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | create_drop_db_tablespace (1 row) \c - - - :worker_2_port @@ -46,9 +55,9 @@ FROM pg_database pd JOIN pg_authid pa ON pd.datdba = pa.oid join pg_tablespace pt on pd.dattablespace = pt.oid WHERE datname = 'mydatabase'; - datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace + datname | encoding | datistemplate | datallowconn | datconnlimit | datcollate | datctype | datacl | database_owner | database_owner | tablespace --------------------------------------------------------------------- - mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | pg_default + mydatabase | 6 | f | t | 10 | C | C | | create_drop_db_test_user | create_drop_db_test_user | create_drop_db_tablespace (1 row) \c - - - :master_port @@ -92,5 +101,11 @@ WHERE datname = 'mydatabase'; --------------------------------------------------------------------- (0 rows) +\c - - - :master_port +drop tablespace create_drop_db_tablespace; +\c - - - :worker_1_port +drop tablespace create_drop_db_tablespace; +\c - - - :worker_2_port +drop tablespace create_drop_db_tablespace; \c - - - :master_port drop user create_drop_db_test_user; diff --git a/src/test/regress/pg_regress_multi.pl b/src/test/regress/pg_regress_multi.pl index 4cc022198..ba2251e37 100755 --- a/src/test/regress/pg_regress_multi.pl +++ b/src/test/regress/pg_regress_multi.pl @@ -630,7 +630,7 @@ for my $port (@followerWorkerPorts) } } -for my $tablespace ("ts0", "ts1", "ts2") +for my $tablespace ("ts0", "ts1", "ts2", "ts3", "ts4", "ts5") { if (-e catfile($TMP_CHECKDIR, $tablespace)) { diff --git a/src/test/regress/sql/create_drop_database_propagation.sql b/src/test/regress/sql/create_drop_database_propagation.sql index 576274d66..415a03f97 100644 --- a/src/test/regress/sql/create_drop_database_propagation.sql +++ b/src/test/regress/sql/create_drop_database_propagation.sql @@ -1,3 +1,16 @@ + + +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts3' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; + +\c - - - :worker_1_port +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts4' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; + +\c - - - :worker_2_port +\set create_drop_db_tablespace :abs_srcdir '/tmp_check/ts5' +CREATE TABLESPACE create_drop_db_tablespace LOCATION :'create_drop_db_tablespace'; + \c - - - :master_port create user create_drop_db_test_user; @@ -10,6 +23,7 @@ CREATE DATABASE mydatabase ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' + TABLESPACE = create_drop_db_tablespace ALLOW_CONNECTIONS = true IS_TEMPLATE = false; @@ -78,9 +92,18 @@ JOIN pg_authid pa ON pd.datdba = pa.oid join pg_tablespace pt on pd.dattablespace = pt.oid WHERE datname = 'mydatabase'; +\c - - - :master_port + +drop tablespace create_drop_db_tablespace; + +\c - - - :worker_1_port + +drop tablespace create_drop_db_tablespace; + +\c - - - :worker_2_port + +drop tablespace create_drop_db_tablespace; \c - - - :master_port drop user create_drop_db_test_user; - -