mirror of https://github.com/citusdata/citus.git
Improve tests for >= pg15 & pg >= 16
parent
69217678b3
commit
ffa1fa0963
|
@ -70,7 +70,7 @@ HINT: You can manually create a database and its extensions on workers.
|
||||||
SELECT * FROM public.check_database_on_all_nodes('local_database') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('local_database') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "local_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "local_database", "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": 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}
|
||||||
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)
|
(3 rows)
|
||||||
|
@ -95,7 +95,7 @@ SELECT * FROM public.check_database_on_all_nodes('local_database') ORDER BY node
|
||||||
node_type | result
|
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}
|
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": {"datacl": null, "datname": "local_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": false, "stale_pg_dist_object_record_for_a_db_exists": false}
|
worker node (local) | {"database_properties": {"datacl": null, "datname": "local_database", "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": 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)
|
(3 rows)
|
||||||
|
|
||||||
|
@ -133,9 +133,9 @@ CREATE DATABASE mydatabase_1
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- Test LC / LOCALE settings that don't match the ones provided in template db.
|
-- Test LC / LOCALE settings that don't match the ones provided in template db.
|
||||||
|
@ -160,33 +160,33 @@ CREATE DATABASE lc_collate_lc_ctype_test LC_COLLATE = 'C' LC_CTYPE = 'C';
|
||||||
SELECT * FROM public.check_database_on_all_nodes('lc_collate_test') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('lc_collate_test') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_collate_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_collate_test", "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": "lc_collate_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_collate_test", "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": "lc_collate_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_collate_test", "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)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('lc_ctype_test') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('lc_ctype_test') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_ctype_test", "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": "lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_ctype_test", "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": "lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_ctype_test", "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)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('locale_test') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('locale_test') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "locale_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "locale_test", "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": "locale_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "locale_test", "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": "locale_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "locale_test", "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)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('lc_collate_lc_ctype_test') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('lc_collate_lc_ctype_test') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_collate_lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "lc_collate_lc_ctype_test", "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": "lc_collate_lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_collate_lc_ctype_test", "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": "lc_collate_lc_ctype_test", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "lc_collate_lc_ctype_test", "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)
|
(3 rows)
|
||||||
|
|
||||||
DROP DATABASE lc_collate_test;
|
DROP DATABASE lc_collate_test;
|
||||||
|
@ -225,9 +225,9 @@ SELECT result FROM run_command_on_all_nodes(
|
||||||
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- test database syncing after node addition
|
-- test database syncing after node addition
|
||||||
|
@ -248,8 +248,8 @@ CREATE DATABASE mydatabase
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(2 rows)
|
(2 rows)
|
||||||
|
|
||||||
SET citus.metadata_sync_mode to 'transactional';
|
SET citus.metadata_sync_mode to 'transactional';
|
||||||
|
@ -262,25 +262,25 @@ select 1 from citus_add_node('localhost', :worker_2_port);
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
select 1 from citus_remove_node('localhost', :worker_2_port);
|
select 1 from citus_remove_node('localhost', :worker_2_port);
|
||||||
|
@ -300,25 +300,25 @@ RESET citus.metadata_sync_mode;
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT citus_disable_node_and_wait('localhost', :worker_1_port, true);
|
SELECT citus_disable_node_and_wait('localhost', :worker_1_port, true);
|
||||||
|
@ -337,33 +337,33 @@ SELECT 1 FROM citus_activate_node('localhost', :worker_1_port);
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('mydatabase_1') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "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": "mydatabase_1", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": 10, "daticulocale": null, "datistemplate": false, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('db_needs_escape') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "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": "db_needs_escape", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": true, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "role-needs\\!escape", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SELECT * FROM public.check_database_on_all_nodes('test_node_activation') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('test_node_activation') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "test_node_activation", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "test_node_activation", "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": "test_node_activation", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "test_node_activation", "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": "test_node_activation", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "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": "test_node_activation", "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)
|
(3 rows)
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
SET citus.log_remote_commands = true;
|
||||||
|
@ -402,9 +402,9 @@ CREATE DATABASE my_template_database
|
||||||
SELECT * FROM public.check_database_on_all_nodes('my_template_database') ORDER BY node_type;
|
SELECT * FROM public.check_database_on_all_nodes('my_template_database') ORDER BY node_type;
|
||||||
node_type | result
|
node_type | result
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
coordinator (local) | {"database_properties": {"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "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": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "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": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "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": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "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": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "ts-needs\\!escape", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": true, "database_owner": "create_drop_db_test_user", "datcollversion": null, "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
--template databases could not be dropped so we need to change the template flag
|
--template databases could not be dropped so we need to change the template flag
|
||||||
|
|
|
@ -8,298 +8,75 @@ SELECT substring(:'server_version', '\d+')::int >= 15 AS server_version_ge_15
|
||||||
\else
|
\else
|
||||||
\q
|
\q
|
||||||
\endif
|
\endif
|
||||||
-- create/drop database for pg > 15
|
-- create/drop database for pg >= 15
|
||||||
\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;
|
set citus.enable_create_database_propagation=on;
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
|
||||||
CREATE DATABASE mydatabase
|
CREATE DATABASE mydatabase
|
||||||
WITH
|
WITH OID = 966345;
|
||||||
OWNER = create_drop_db_test_user
|
ERROR: CREATE DATABASE option "oid" is not supported
|
||||||
CONNECTION LIMIT = 10
|
CREATE DATABASE mydatabase
|
||||||
ENCODING = 'UTF8'
|
WITH strategy file_copy;
|
||||||
TABLESPACE = create_drop_db_tablespace
|
ERROR: Only wal_log is supported as strategy parameter for CREATE DATABASE
|
||||||
ALLOW_CONNECTIONS = true
|
CREATE DATABASE st_wal_log
|
||||||
IS_TEMPLATE = false
|
WITH strategy WaL_LoG;
|
||||||
OID = 966345;
|
SELECT * FROM public.check_database_on_all_nodes('st_wal_log') ORDER BY node_type;
|
||||||
NOTICE: issuing CREATE DATABASE mydatabase OWNER create_drop_db_test_user CONNECTION LIMIT 10 ENCODING 'UTF8' TABLESPACE create_drop_db_tablespace ALLOW_CONNECTIONS true IS_TEMPLATE false OID 966345
|
node_type | result
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing CREATE DATABASE mydatabase OWNER create_drop_db_test_user CONNECTION LIMIT 10 ENCODING 'UTF8' TABLESPACE create_drop_db_tablespace ALLOW_CONNECTIONS true IS_TEMPLATE false OID 966345
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
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'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
[{"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "st_wal_log", "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}
|
||||||
[{"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
worker node (remote) | {"database_properties": {"datacl": null, "datname": "st_wal_log", "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}
|
||||||
[{"datacl": null, "datname": "mydatabase", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": 10, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
worker node (remote) | {"database_properties": {"datacl": null, "datname": "st_wal_log", "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)
|
(3 rows)
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
drop database st_wal_log;
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
select 1 from citus_remove_node('localhost', :worker_2_port);
|
||||||
drop database mydatabase;
|
?column?
|
||||||
NOTICE: issuing DROP DATABASE mydatabase
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing DROP DATABASE mydatabase
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
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'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
1
|
||||||
|
|
||||||
|
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
select citus_remove_node('localhost', :worker_2_port);
|
|
||||||
citus_remove_node
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
-- test COLLATION_VERSION
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
CREATE DATABASE test_collation_version
|
||||||
CREATE DATABASE mydatabase2
|
WITH ENCODING = 'UTF8'
|
||||||
WITH OWNER = create_drop_db_test_user
|
COLLATION_VERSION = '1.0'
|
||||||
ENCODING = 'UTF8'
|
ALLOW_CONNECTIONS = false;
|
||||||
TABLESPACE = create_drop_db_tablespace
|
|
||||||
ALLOW_CONNECTIONS = true
|
|
||||||
IS_TEMPLATE = false
|
|
||||||
OID = 966345;
|
|
||||||
NOTICE: issuing CREATE DATABASE mydatabase2 OWNER create_drop_db_test_user ENCODING 'UTF8' TABLESPACE create_drop_db_tablespace ALLOW_CONNECTIONS true IS_TEMPLATE false OID 966345
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'mydatabase2'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
[{"datacl": null, "datname": "mydatabase2", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": -1, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
[{"datacl": null, "datname": "mydatabase2", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": -1, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
(2 rows)
|
|
||||||
|
|
||||||
select 1 from citus_add_node('localhost', :worker_2_port);
|
select 1 from citus_add_node('localhost', :worker_2_port);
|
||||||
?column?
|
?column?
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
1
|
1
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
SELECT * FROM public.check_database_on_all_nodes('test_collation_version') ORDER BY node_type;
|
||||||
$$
|
node_type | result
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'mydatabase2'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
[{"datacl": null, "datname": "mydatabase2", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": -1, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "test_collation_version", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": "1.0", "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
[{"datacl": null, "datname": "mydatabase2", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": -1, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
worker node (remote) | {"database_properties": {"datacl": null, "datname": "test_collation_version", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": "1.0", "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
[{"datacl": null, "datname": "mydatabase2", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": true, "datconnlimit": -1, "datistemplate": false, "database_owner": "create_drop_db_test_user"}]
|
worker node (remote) | {"database_properties": {"datacl": null, "datname": "test_collation_version", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "pg_default", "daticurules": null, "datallowconn": false, "datconnlimit": -1, "daticulocale": null, "datistemplate": false, "database_owner": "postgres", "datcollversion": "1.0", "datlocprovider": "c"}, "pg_dist_object_record_for_db_exists": true, "stale_pg_dist_object_record_for_a_db_exists": false}
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
drop database test_collation_version;
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
SET client_min_messages TO WARNING;
|
||||||
drop database mydatabase2;
|
-- test LOCALE_PROVIDER & ICU_LOCALE
|
||||||
NOTICE: issuing DROP DATABASE mydatabase2
|
CREATE DATABASE test_locale_provider
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
WITH ENCODING = 'UTF8'
|
||||||
NOTICE: issuing DROP DATABASE mydatabase2
|
LOCALE_PROVIDER = 'icu'
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
ICU_LOCALE = 'en_US';
|
||||||
SET citus.log_remote_commands = false;
|
ERROR: new locale provider (icu) does not match locale provider of the template database (libc)
|
||||||
SELECT result from run_command_on_all_nodes(
|
HINT: Use the same locale provider as in the template database, or use template0 as template.
|
||||||
$$
|
RESET client_min_messages;
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
CREATE DATABASE test_locale_provider
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
WITH ENCODING = 'UTF8'
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
LOCALE_PROVIDER = 'libc'
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
ICU_LOCALE = 'en_US';
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
ERROR: ICU locale cannot be specified unless locale provider is ICU
|
||||||
FROM pg_database pd
|
CREATE DATABASE test_locale_provider
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
WITH ENCODING = 'UTF8'
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
LOCALE_PROVIDER = 'libc';
|
||||||
WHERE datname = 'mydatabase'
|
SELECT * FROM public.check_database_on_all_nodes('test_locale_provider') ORDER BY node_type;
|
||||||
) q2
|
node_type | result
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
coordinator (local) | {"database_properties": {"datacl": null, "datname": "test_locale_provider", "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": "test_locale_provider", "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": "test_locale_provider", "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)
|
(3 rows)
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
drop database test_locale_provider;
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
|
||||||
-- create a template database with all options set and allow connections false
|
|
||||||
CREATE DATABASE my_template_database
|
|
||||||
WITH OWNER = create_drop_db_test_user
|
|
||||||
ENCODING = 'UTF8'
|
|
||||||
COLLATION_VERSION = '1.0'
|
|
||||||
TABLESPACE = create_drop_db_tablespace
|
|
||||||
ALLOW_CONNECTIONS = false
|
|
||||||
IS_TEMPLATE = true;
|
|
||||||
NOTICE: issuing CREATE DATABASE my_template_database OWNER create_drop_db_test_user ENCODING 'UTF8' COLLATION_VERSION '1.0' TABLESPACE create_drop_db_tablespace ALLOW_CONNECTIONS false IS_TEMPLATE true
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing CREATE DATABASE my_template_database OWNER create_drop_db_test_user ENCODING 'UTF8' COLLATION_VERSION '1.0' TABLESPACE create_drop_db_tablespace ALLOW_CONNECTIONS false IS_TEMPLATE true
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
[{"datacl": null, "datname": "my_template_database", "datctype": "C", "encoding": "UTF8", "datcollate": "C", "tablespace": "create_drop_db_tablespace", "datallowconn": false, "datconnlimit": -1, "datistemplate": true, "database_owner": "create_drop_db_test_user"}]
|
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
--template databases could not be dropped so we need to change the template flag
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
UPDATE pg_database SET datistemplate = false WHERE datname = 'my_template_database'
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
UPDATE 1
|
|
||||||
UPDATE 1
|
|
||||||
UPDATE 1
|
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database my_template_database;
|
|
||||||
NOTICE: issuing DROP DATABASE my_template_database
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing DROP DATABASE my_template_database
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
result
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(3 rows)
|
|
||||||
|
|
||||||
--tests for special characters in database name
|
|
||||||
set citus.enable_create_database_propagation=on;
|
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
|
||||||
create database "mydatabase#1'2";
|
|
||||||
NOTICE: issuing CREATE DATABASE "mydatabase#1'2"
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing CREATE DATABASE "mydatabase#1'2"
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database if exists "mydatabase#1'2";
|
|
||||||
NOTICE: issuing DROP DATABASE IF EXISTS "mydatabase#1'2"
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
NOTICE: issuing DROP DATABASE IF EXISTS "mydatabase#1'2"
|
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|
||||||
\c - - - :master_port
|
\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;
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
--
|
||||||
|
-- PG16
|
||||||
|
--
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
\if :server_version_ge_16
|
||||||
|
\else
|
||||||
|
\q
|
||||||
|
\endif
|
||||||
|
-- create/drop database for pg >= 16
|
||||||
|
set citus.enable_create_database_propagation=on;
|
||||||
|
-- test icu_rules
|
||||||
|
--
|
||||||
|
-- practically we don't support it but better to test
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook';
|
||||||
|
ERROR: ICU rules cannot be specified unless locale provider is ICU
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook' locale_provider='icu';
|
||||||
|
ERROR: LOCALE or ICU_LOCALE must be specified
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook' locale_provider='icu' icu_locale = 'de_DE';
|
||||||
|
NOTICE: using standard form "de-DE" for ICU locale "de_DE"
|
||||||
|
ERROR: new locale provider (icu) does not match locale provider of the template database (libc)
|
||||||
|
HINT: Use the same locale provider as in the template database, or use template0 as template.
|
|
@ -0,0 +1,9 @@
|
||||||
|
--
|
||||||
|
-- PG16
|
||||||
|
--
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
\if :server_version_ge_16
|
||||||
|
\else
|
||||||
|
\q
|
|
@ -534,7 +534,22 @@ $func$ LANGUAGE plpgsql;
|
||||||
CREATE OR REPLACE FUNCTION check_database_on_all_nodes(p_database_name text)
|
CREATE OR REPLACE FUNCTION check_database_on_all_nodes(p_database_name text)
|
||||||
RETURNS TABLE (node_type text, result text)
|
RETURNS TABLE (node_type text, result text)
|
||||||
AS $func$
|
AS $func$
|
||||||
|
DECLARE
|
||||||
|
pg_ge_15_options text := '';
|
||||||
|
pg_ge_16_options text := '';
|
||||||
BEGIN
|
BEGIN
|
||||||
|
IF EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'pg_database'::regclass AND attname = 'datlocprovider') THEN
|
||||||
|
pg_ge_15_options := ', daticulocale, datcollversion, datlocprovider';
|
||||||
|
ELSE
|
||||||
|
pg_ge_15_options := $$, null as daticulocale, null as datcollversion, 'c' as datlocprovider$$;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'pg_database'::regclass AND attname = 'daticurules') THEN
|
||||||
|
pg_ge_16_options := ', daticurules';
|
||||||
|
ELSE
|
||||||
|
pg_ge_16_options := ', null as daticurules';
|
||||||
|
END IF;
|
||||||
|
|
||||||
RETURN QUERY
|
RETURN QUERY
|
||||||
SELECT
|
SELECT
|
||||||
CASE WHEN (groupid = 0 AND groupid = (SELECT groupid FROM pg_dist_local_group)) THEN 'coordinator (local)'
|
CASE WHEN (groupid = 0 AND groupid = (SELECT groupid FROM pg_dist_local_group)) THEN 'coordinator (local)'
|
||||||
|
@ -553,19 +568,20 @@ BEGIN
|
||||||
SELECT to_jsonb(database_properties.*)
|
SELECT to_jsonb(database_properties.*)
|
||||||
FROM (
|
FROM (
|
||||||
SELECT datname, pa.rolname as database_owner,
|
SELECT datname, pa.rolname as database_owner,
|
||||||
pg_encoding_to_char(pd.encoding) as encoding, datlocprovider,
|
pg_encoding_to_char(pd.encoding) as encoding,
|
||||||
datistemplate, datallowconn, datconnlimit,
|
datistemplate, datallowconn, datconnlimit, datacl,
|
||||||
pt.spcname AS tablespace, datcollate, datctype, daticulocale,
|
pt.spcname AS tablespace, datcollate, datctype
|
||||||
datcollversion, datacl
|
%2$s -- >= pg15 options
|
||||||
|
%3$s -- >= pg16 options
|
||||||
FROM pg_database pd
|
FROM pg_database pd
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
JOIN pg_authid pa ON pd.datdba = pa.oid
|
||||||
JOIN pg_tablespace pt ON pd.dattablespace = pt.oid
|
JOIN pg_tablespace pt ON pd.dattablespace = pt.oid
|
||||||
WHERE datname = '%s'
|
WHERE datname = '%1$s'
|
||||||
) database_properties
|
) database_properties
|
||||||
) AS database_properties,
|
) AS database_properties,
|
||||||
(
|
(
|
||||||
SELECT COUNT(*)=1
|
SELECT COUNT(*)=1
|
||||||
FROM pg_dist_object WHERE objid = (SELECT oid FROM pg_database WHERE datname = '%s')
|
FROM pg_dist_object WHERE objid = (SELECT oid FROM pg_database WHERE datname = '%1$s')
|
||||||
) AS pg_dist_object_record_for_db_exists,
|
) AS pg_dist_object_record_for_db_exists,
|
||||||
(
|
(
|
||||||
SELECT COUNT(*) > 0
|
SELECT COUNT(*) > 0
|
||||||
|
@ -574,7 +590,7 @@ BEGIN
|
||||||
) AS stale_pg_dist_object_record_for_a_db_exists
|
) AS stale_pg_dist_object_record_for_a_db_exists
|
||||||
) q
|
) q
|
||||||
$$,
|
$$,
|
||||||
p_database_name, p_database_name
|
p_database_name, pg_ge_15_options, pg_ge_16_options
|
||||||
)
|
)
|
||||||
) q2
|
) q2
|
||||||
JOIN pg_dist_node USING (nodeid);
|
JOIN pg_dist_node USING (nodeid);
|
||||||
|
|
|
@ -36,6 +36,7 @@ test: distributed_triggers
|
||||||
test: create_single_shard_table
|
test: create_single_shard_table
|
||||||
test: create_drop_database_propagation
|
test: create_drop_database_propagation
|
||||||
test: create_drop_database_propagation_pg15
|
test: create_drop_database_propagation_pg15
|
||||||
|
test: create_drop_database_propagation_pg16
|
||||||
|
|
||||||
# don't parallelize single_shard_table_udfs to make sure colocation ids are sequential
|
# don't parallelize single_shard_table_udfs to make sure colocation ids are sequential
|
||||||
test: single_shard_table_udfs
|
test: single_shard_table_udfs
|
||||||
|
|
|
@ -9,236 +9,57 @@ SELECT substring(:'server_version', '\d+')::int >= 15 AS server_version_ge_15
|
||||||
\q
|
\q
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
-- create/drop database for pg > 15
|
-- create/drop database for pg >= 15
|
||||||
|
|
||||||
|
|
||||||
\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;
|
set citus.enable_create_database_propagation=on;
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
|
||||||
CREATE DATABASE mydatabase
|
CREATE DATABASE mydatabase
|
||||||
WITH
|
WITH OID = 966345;
|
||||||
OWNER = create_drop_db_test_user
|
|
||||||
CONNECTION LIMIT = 10
|
|
||||||
ENCODING = 'UTF8'
|
|
||||||
TABLESPACE = create_drop_db_tablespace
|
|
||||||
ALLOW_CONNECTIONS = true
|
|
||||||
IS_TEMPLATE = false
|
|
||||||
OID = 966345;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
CREATE DATABASE mydatabase
|
||||||
|
WITH strategy file_copy;
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
CREATE DATABASE st_wal_log
|
||||||
$$
|
WITH strategy WaL_LoG;
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
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'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
SELECT * FROM public.check_database_on_all_nodes('st_wal_log') ORDER BY node_type;
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database mydatabase;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
drop database st_wal_log;
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
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'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
select citus_remove_node('localhost', :worker_2_port);
|
select 1 from citus_remove_node('localhost', :worker_2_port);
|
||||||
|
|
||||||
|
-- test COLLATION_VERSION
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
CREATE DATABASE test_collation_version
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
WITH ENCODING = 'UTF8'
|
||||||
|
COLLATION_VERSION = '1.0'
|
||||||
CREATE DATABASE mydatabase2
|
ALLOW_CONNECTIONS = false;
|
||||||
WITH OWNER = create_drop_db_test_user
|
|
||||||
ENCODING = 'UTF8'
|
|
||||||
TABLESPACE = create_drop_db_tablespace
|
|
||||||
ALLOW_CONNECTIONS = true
|
|
||||||
IS_TEMPLATE = false
|
|
||||||
OID = 966345;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'mydatabase2'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
|
|
||||||
select 1 from citus_add_node('localhost', :worker_2_port);
|
select 1 from citus_add_node('localhost', :worker_2_port);
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
SELECT * FROM public.check_database_on_all_nodes('test_collation_version') ORDER BY node_type;
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'mydatabase2'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
drop database test_collation_version;
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database mydatabase2;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
SET client_min_messages TO WARNING;
|
||||||
|
-- test LOCALE_PROVIDER & ICU_LOCALE
|
||||||
|
CREATE DATABASE test_locale_provider
|
||||||
|
WITH ENCODING = 'UTF8'
|
||||||
|
LOCALE_PROVIDER = 'icu'
|
||||||
|
ICU_LOCALE = 'en_US';
|
||||||
|
RESET client_min_messages;
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
CREATE DATABASE test_locale_provider
|
||||||
$$
|
WITH ENCODING = 'UTF8'
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
LOCALE_PROVIDER = 'libc'
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
ICU_LOCALE = 'en_US';
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
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'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
CREATE DATABASE test_locale_provider
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
WITH ENCODING = 'UTF8'
|
||||||
|
LOCALE_PROVIDER = 'libc';
|
||||||
|
|
||||||
-- create a template database with all options set and allow connections false
|
SELECT * FROM public.check_database_on_all_nodes('test_locale_provider') ORDER BY node_type;
|
||||||
CREATE DATABASE my_template_database
|
|
||||||
WITH OWNER = create_drop_db_test_user
|
|
||||||
ENCODING = 'UTF8'
|
|
||||||
COLLATION_VERSION = '1.0'
|
|
||||||
TABLESPACE = create_drop_db_tablespace
|
|
||||||
ALLOW_CONNECTIONS = false
|
|
||||||
IS_TEMPLATE = true;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
drop database test_locale_provider;
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
|
|
||||||
--template databases could not be dropped so we need to change the template flag
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
UPDATE pg_database SET datistemplate = false WHERE datname = 'my_template_database'
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
|
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database my_template_database;
|
|
||||||
|
|
||||||
SET citus.log_remote_commands = false;
|
|
||||||
SELECT result from run_command_on_all_nodes(
|
|
||||||
$$
|
|
||||||
SELECT jsonb_agg(to_jsonb(q2.*)) FROM (
|
|
||||||
SELECT pd.datname, pg_encoding_to_char(pd.encoding) as encoding,
|
|
||||||
pd.datistemplate, pd.datallowconn, pd.datconnlimit,
|
|
||||||
pd.datcollate , pd. datctype , pd.datacl,
|
|
||||||
pa.rolname AS database_owner, pt.spcname AS tablespace
|
|
||||||
FROM pg_database pd
|
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
|
||||||
join pg_tablespace pt on pd.dattablespace = pt.oid
|
|
||||||
WHERE datname = 'my_template_database'
|
|
||||||
) q2
|
|
||||||
$$
|
|
||||||
) ORDER BY result;
|
|
||||||
|
|
||||||
|
|
||||||
--tests for special characters in database name
|
|
||||||
set citus.enable_create_database_propagation=on;
|
|
||||||
SET citus.log_remote_commands = true;
|
|
||||||
set citus.grep_remote_commands = '%CREATE DATABASE%';
|
|
||||||
|
|
||||||
create database "mydatabase#1'2";
|
|
||||||
|
|
||||||
set citus.grep_remote_commands = '%DROP DATABASE%';
|
|
||||||
drop database if exists "mydatabase#1'2";
|
|
||||||
|
|
||||||
\c - - - :master_port
|
\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;
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
--
|
||||||
|
-- PG16
|
||||||
|
--
|
||||||
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int >= 16 AS server_version_ge_16
|
||||||
|
\gset
|
||||||
|
\if :server_version_ge_16
|
||||||
|
\else
|
||||||
|
\q
|
||||||
|
\endif
|
||||||
|
|
||||||
|
-- create/drop database for pg >= 16
|
||||||
|
|
||||||
|
set citus.enable_create_database_propagation=on;
|
||||||
|
|
||||||
|
-- test icu_rules
|
||||||
|
--
|
||||||
|
-- practically we don't support it but better to test
|
||||||
|
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook';
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook' locale_provider='icu';
|
||||||
|
CREATE DATABASE citus_icu_rules_test WITH icu_rules='de_DE@collation=phonebook' locale_provider='icu' icu_locale = 'de_DE';
|
|
@ -560,7 +560,22 @@ $func$ LANGUAGE plpgsql;
|
||||||
CREATE OR REPLACE FUNCTION check_database_on_all_nodes(p_database_name text)
|
CREATE OR REPLACE FUNCTION check_database_on_all_nodes(p_database_name text)
|
||||||
RETURNS TABLE (node_type text, result text)
|
RETURNS TABLE (node_type text, result text)
|
||||||
AS $func$
|
AS $func$
|
||||||
|
DECLARE
|
||||||
|
pg_ge_15_options text := '';
|
||||||
|
pg_ge_16_options text := '';
|
||||||
BEGIN
|
BEGIN
|
||||||
|
IF EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'pg_database'::regclass AND attname = 'datlocprovider') THEN
|
||||||
|
pg_ge_15_options := ', daticulocale, datcollversion, datlocprovider';
|
||||||
|
ELSE
|
||||||
|
pg_ge_15_options := $$, null as daticulocale, null as datcollversion, 'c' as datlocprovider$$;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'pg_database'::regclass AND attname = 'daticurules') THEN
|
||||||
|
pg_ge_16_options := ', daticurules';
|
||||||
|
ELSE
|
||||||
|
pg_ge_16_options := ', null as daticurules';
|
||||||
|
END IF;
|
||||||
|
|
||||||
RETURN QUERY
|
RETURN QUERY
|
||||||
SELECT
|
SELECT
|
||||||
CASE WHEN (groupid = 0 AND groupid = (SELECT groupid FROM pg_dist_local_group)) THEN 'coordinator (local)'
|
CASE WHEN (groupid = 0 AND groupid = (SELECT groupid FROM pg_dist_local_group)) THEN 'coordinator (local)'
|
||||||
|
@ -579,19 +594,20 @@ BEGIN
|
||||||
SELECT to_jsonb(database_properties.*)
|
SELECT to_jsonb(database_properties.*)
|
||||||
FROM (
|
FROM (
|
||||||
SELECT datname, pa.rolname as database_owner,
|
SELECT datname, pa.rolname as database_owner,
|
||||||
pg_encoding_to_char(pd.encoding) as encoding, datlocprovider,
|
pg_encoding_to_char(pd.encoding) as encoding,
|
||||||
datistemplate, datallowconn, datconnlimit,
|
datistemplate, datallowconn, datconnlimit, datacl,
|
||||||
pt.spcname AS tablespace, datcollate, datctype, daticulocale,
|
pt.spcname AS tablespace, datcollate, datctype
|
||||||
datcollversion, datacl
|
%2$s -- >= pg15 options
|
||||||
|
%3$s -- >= pg16 options
|
||||||
FROM pg_database pd
|
FROM pg_database pd
|
||||||
JOIN pg_authid pa ON pd.datdba = pa.oid
|
JOIN pg_authid pa ON pd.datdba = pa.oid
|
||||||
JOIN pg_tablespace pt ON pd.dattablespace = pt.oid
|
JOIN pg_tablespace pt ON pd.dattablespace = pt.oid
|
||||||
WHERE datname = '%s'
|
WHERE datname = '%1$s'
|
||||||
) database_properties
|
) database_properties
|
||||||
) AS database_properties,
|
) AS database_properties,
|
||||||
(
|
(
|
||||||
SELECT COUNT(*)=1
|
SELECT COUNT(*)=1
|
||||||
FROM pg_dist_object WHERE objid = (SELECT oid FROM pg_database WHERE datname = '%s')
|
FROM pg_dist_object WHERE objid = (SELECT oid FROM pg_database WHERE datname = '%1$s')
|
||||||
) AS pg_dist_object_record_for_db_exists,
|
) AS pg_dist_object_record_for_db_exists,
|
||||||
(
|
(
|
||||||
SELECT COUNT(*) > 0
|
SELECT COUNT(*) > 0
|
||||||
|
@ -600,7 +616,7 @@ BEGIN
|
||||||
) AS stale_pg_dist_object_record_for_a_db_exists
|
) AS stale_pg_dist_object_record_for_a_db_exists
|
||||||
) q
|
) q
|
||||||
$$,
|
$$,
|
||||||
p_database_name, p_database_name
|
p_database_name, pg_ge_15_options, pg_ge_16_options
|
||||||
)
|
)
|
||||||
) q2
|
) q2
|
||||||
JOIN pg_dist_node USING (nodeid);
|
JOIN pg_dist_node USING (nodeid);
|
||||||
|
|
Loading…
Reference in New Issue