mirror of https://github.com/citusdata/citus.git
Try to find leftover replication slots in enterprise schedule
parent
e14e8667cc
commit
8a36bfe484
|
@ -486,7 +486,7 @@ jobs:
|
|||
image: ${{ needs.params.outputs.fail_test_image_name }}:${{ fromJson(needs.params.outputs.pg16_version).full }}${{ needs.params.outputs.image_suffix }}
|
||||
options: --user root
|
||||
env:
|
||||
runs: 8
|
||||
runs: 20
|
||||
needs:
|
||||
- params
|
||||
- build
|
||||
|
|
|
@ -199,6 +199,9 @@ DEPS = {
|
|||
repeatable=False,
|
||||
),
|
||||
"multi_prepare_plsql": TestDeps("base_schedule"),
|
||||
"multi_tenant_isolation": TestDeps(
|
||||
"minimal_schedule", ["multi_data_types"]
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,3 +86,28 @@ RESET ROLE;
|
|||
-- cleanup at exit
|
||||
DROP SCHEMA citus_local_tables_ent CASCADE;
|
||||
NOTICE: drop cascades to 2 other objects
|
||||
DROP USER user_can_select_a_1;
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
|
|
|
@ -9,6 +9,12 @@ SELECT nextval('pg_catalog.pg_dist_placement_placementid_seq') AS last_placement
|
|||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 100000;
|
||||
CREATE SCHEMA "Tenant Isolation";
|
||||
SET search_path to "Tenant Isolation";
|
||||
SELECT citus_set_coordinator_host('localhost');
|
||||
citus_set_coordinator_host
|
||||
---------------------------------------------------------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
||||
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
||||
-- connect with this new role
|
||||
|
@ -1228,3 +1234,27 @@ SELECT count(*) FROM pg_catalog.pg_dist_partition WHERE colocationid > 0;
|
|||
TRUNCATE TABLE pg_catalog.pg_dist_colocation;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 1;
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
|
|
|
@ -544,3 +544,27 @@ DROP SCHEMA publication CASCADE;
|
|||
DROP SCHEMA "publication-1" CASCADE;
|
||||
DROP SCHEMA citus_schema_1 CASCADE;
|
||||
DROP SCHEMA publication2 CASCADE;
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
result
|
||||
---------------------------------------------------------------------
|
||||
0
|
||||
0
|
||||
0
|
||||
(3 rows)
|
||||
|
||||
|
|
|
@ -72,3 +72,8 @@ RESET ROLE;
|
|||
|
||||
-- cleanup at exit
|
||||
DROP SCHEMA citus_local_tables_ent CASCADE;
|
||||
DROP USER user_can_select_a_1;
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
|
|
|
@ -12,6 +12,8 @@ ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART 100000;
|
|||
CREATE SCHEMA "Tenant Isolation";
|
||||
SET search_path to "Tenant Isolation";
|
||||
|
||||
SELECT citus_set_coordinator_host('localhost');
|
||||
|
||||
CREATE ROLE mx_isolation_role_ent WITH LOGIN;
|
||||
GRANT ALL ON SCHEMA "Tenant Isolation", public TO mx_isolation_role_ent;
|
||||
|
||||
|
@ -610,3 +612,7 @@ TRUNCATE TABLE pg_catalog.pg_dist_colocation;
|
|||
ALTER SEQUENCE pg_catalog.pg_dist_colocationid_seq RESTART 1;
|
||||
|
||||
ALTER SEQUENCE pg_catalog.pg_dist_placement_placementid_seq RESTART :last_placement_id;
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
|
|
|
@ -391,3 +391,7 @@ DROP SCHEMA publication CASCADE;
|
|||
DROP SCHEMA "publication-1" CASCADE;
|
||||
DROP SCHEMA citus_schema_1 CASCADE;
|
||||
DROP SCHEMA publication2 CASCADE;
|
||||
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_replication_slots$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_publication$$);
|
||||
SELECT result FROM run_command_on_all_nodes($$SELECT count(*) FROM pg_subscription$$);
|
||||
|
|
Loading…
Reference in New Issue