From 1b923eb480b4a83dba263b3a1adb46e47635d8cb Mon Sep 17 00:00:00 2001 From: naisila Date: Fri, 10 Nov 2023 10:13:46 +0300 Subject: [PATCH] Try running cleanup function more than once --- .../citus_non_blocking_split_shard_cleanup.out | 12 ++++++++++++ src/test/regress/expected/logical_replication.out | 12 ++++++++++++ .../sql/citus_non_blocking_split_shard_cleanup.sql | 2 ++ src/test/regress/sql/logical_replication.sql | 2 ++ 4 files changed, 28 insertions(+) diff --git a/src/test/regress/expected/citus_non_blocking_split_shard_cleanup.out b/src/test/regress/expected/citus_non_blocking_split_shard_cleanup.out index a559ec442..b2b28c9eb 100644 --- a/src/test/regress/expected/citus_non_blocking_split_shard_cleanup.out +++ b/src/test/regress/expected/citus_non_blocking_split_shard_cleanup.out @@ -113,6 +113,18 @@ SELECT public.wait_for_resource_cleanup(); (1 row) +SELECT public.wait_for_resource_cleanup(); + wait_for_resource_cleanup +--------------------------------------------------------------------- + +(1 row) + +SELECT public.wait_for_resource_cleanup(); + wait_for_resource_cleanup +--------------------------------------------------------------------- + +(1 row) + \c - - - :worker_2_port SET search_path TO "citus_split_test_schema"; -- Replication slots should be cleaned up diff --git a/src/test/regress/expected/logical_replication.out b/src/test/regress/expected/logical_replication.out index b5a36125a..a8a05d1eb 100644 --- a/src/test/regress/expected/logical_replication.out +++ b/src/test/regress/expected/logical_replication.out @@ -93,6 +93,18 @@ SELECT public.wait_for_resource_cleanup(); (1 row) +SELECT public.wait_for_resource_cleanup(); + wait_for_resource_cleanup +--------------------------------------------------------------------- + +(1 row) + +SELECT public.wait_for_resource_cleanup(); + wait_for_resource_cleanup +--------------------------------------------------------------------- + +(1 row) + -- the subscription is still there, as there is no cleanup record for it -- we have created it manually SELECT subname from pg_subscription; diff --git a/src/test/regress/sql/citus_non_blocking_split_shard_cleanup.sql b/src/test/regress/sql/citus_non_blocking_split_shard_cleanup.sql index 480d81b88..0cffc6a0e 100644 --- a/src/test/regress/sql/citus_non_blocking_split_shard_cleanup.sql +++ b/src/test/regress/sql/citus_non_blocking_split_shard_cleanup.sql @@ -80,6 +80,8 @@ SELECT pg_catalog.citus_split_shard_by_split_points( 'force_logical'); SELECT public.wait_for_resource_cleanup(); +SELECT public.wait_for_resource_cleanup(); +SELECT public.wait_for_resource_cleanup(); \c - - - :worker_2_port SET search_path TO "citus_split_test_schema"; diff --git a/src/test/regress/sql/logical_replication.sql b/src/test/regress/sql/logical_replication.sql index a85c70b08..0460d5c90 100644 --- a/src/test/regress/sql/logical_replication.sql +++ b/src/test/regress/sql/logical_replication.sql @@ -53,6 +53,8 @@ SET search_path TO logical_replication; select citus_move_shard_placement(6830002, 'localhost', :worker_1_port, 'localhost', :worker_2_port, 'force_logical'); +SELECT public.wait_for_resource_cleanup(); +SELECT public.wait_for_resource_cleanup(); SELECT public.wait_for_resource_cleanup(); -- the subscription is still there, as there is no cleanup record for it