From 18b5bc395d462e32844d8aef3e8a6e54942d880a Mon Sep 17 00:00:00 2001 From: Vignesh C Date: Wed, 9 Sep 2026 10:09:05 +0530 Subject: [PATCH v1 4/5] Fix test to use a fresh subscription Drop tap_sub before recreating it for the second multi-publication test. Also use safe_psql() so that failure does not go unnoticed. --- src/test/subscription/t/037_except.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/test/subscription/t/037_except.pl b/src/test/subscription/t/037_except.pl index a73a509e763..c85dcb6fd64 100644 --- a/src/test/subscription/t/037_except.pl +++ b/src/test/subscription/t/037_except.pl @@ -239,7 +239,7 @@ $node_publisher->safe_psql( CREATE PUBLICATION tap_pub2 FOR TABLE tab1; INSERT INTO tab1 VALUES(1); )); -$node_subscriber->psql('postgres', +$node_subscriber->safe_psql('postgres', "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr' PUBLICATION tap_pub1, tap_pub2" ); $node_subscriber->wait_for_subscription_sync($node_publisher, 'tap_sub'); @@ -258,7 +258,11 @@ $node_publisher->safe_psql( DROP PUBLICATION tap_pub2; TRUNCATE tab1; )); -$node_subscriber->safe_psql('postgres', qq(TRUNCATE tab1)); +$node_subscriber->safe_psql( + 'postgres', qq( + DROP SUBSCRIPTION tap_sub; + TRUNCATE tab1; +)); # OK when a table is excluded by pub1 EXCEPT clause, but it is included by pub2 # FOR ALL TABLES. @@ -267,7 +271,7 @@ $node_publisher->safe_psql( CREATE PUBLICATION tap_pub2 FOR ALL TABLES; INSERT INTO tab1 VALUES(1); )); -$node_subscriber->psql('postgres', +$node_subscriber->safe_psql('postgres', "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr' PUBLICATION tap_pub1, tap_pub2" ); $node_subscriber->wait_for_subscription_sync($node_publisher, 'tap_sub'); -- 2.55.0