Skip to content

Commit

Permalink
check pg_dist_object too in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir committed Feb 21, 2024
1 parent 6dbe189 commit 18d6cb0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
40 changes: 20 additions & 20 deletions src/test/regress/expected/other_databases.out
Original file line number Diff line number Diff line change
Expand Up @@ -155,45 +155,45 @@ SELECT pg_sleep(0.1);
\c other_db1
CREATE DATABASE other_db3;
\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db3'$$);
result
SELECT * FROM public.check_database_on_all_nodes('other_db3') ORDER BY node_type;
node_type | result
---------------------------------------------------------------------
other_db3
other_db3
other_db3
coordinator (local) | {"database_properties": {"datacl": null, "datname": "other_db3", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": {"datacl": null, "datname": "other_db3", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": {"datacl": null, "datname": "other_db3", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
(3 rows)

\c other_db1
DROP DATABASE other_db3;
\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db3'$$);
result
SELECT * FROM public.check_database_on_all_nodes('other_db3') ORDER BY node_type;
node_type | result
---------------------------------------------------------------------



coordinator (local) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
(3 rows)

\c worker_other_db - - :worker_1_port
CREATE DATABASE other_db4;
\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db4'$$);
result
SELECT * FROM public.check_database_on_all_nodes('other_db4') ORDER BY node_type;
node_type | result
---------------------------------------------------------------------
other_db4
other_db4
other_db4
coordinator (remote) | {"database_properties": {"datacl": null, "datname": "other_db4", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (local) | {"database_properties": {"datacl": null, "datname": "other_db4", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": {"datacl": null, "datname": "other_db4", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
(3 rows)

\c worker_other_db
DROP DATABASE other_db4;
\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db4'$$);
result
SELECT * FROM public.check_database_on_all_nodes('other_db4') ORDER BY node_type;
node_type | result
---------------------------------------------------------------------



coordinator (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (local) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
worker node (remote) | {"database_properties": null, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
(3 rows)

DROP DATABASE worker_other_db;
Expand Down
8 changes: 4 additions & 4 deletions src/test/regress/sql/other_databases.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@ SELECT pg_sleep(0.1);
CREATE DATABASE other_db3;

\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db3'$$);
SELECT * FROM public.check_database_on_all_nodes('other_db3') ORDER BY node_type;

\c other_db1
DROP DATABASE other_db3;

\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db3'$$);
SELECT * FROM public.check_database_on_all_nodes('other_db3') ORDER BY node_type;

\c worker_other_db - - :worker_1_port
CREATE DATABASE other_db4;

\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db4'$$);
SELECT * FROM public.check_database_on_all_nodes('other_db4') ORDER BY node_type;

\c worker_other_db
DROP DATABASE other_db4;

\c regression
SELECT result FROM run_command_on_all_nodes($$SELECT datname FROM pg_database WHERE datname = 'other_db4'$$);
SELECT * FROM public.check_database_on_all_nodes('other_db4') ORDER BY node_type;

DROP DATABASE worker_other_db;
\c - - - :master_port
Expand Down

0 comments on commit 18d6cb0

Please sign in to comment.