Skip to content

Commit 0dcea33

Browse files
author
Amit Kapila
committed
Fix random failure in 021_twophase.
After disabling the subscription, the failed test was changing the two_phase option for the subscription. We can't change the two_phase option for a subscription till the corresponding apply worker is active. The check to ensure that the replication apply worker has exited was incorrect. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm3YY+bzj+JWJbY+DsUgJ2mPk8OR1ttjVX2cywKr4BUgxw@mail.gmail.com
1 parent 679c508 commit 0dcea33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/subscription/t/021_twophase.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@
385385
$node_subscriber->safe_psql('postgres',
386386
"ALTER SUBSCRIPTION tap_sub_copy DISABLE;");
387387
$node_subscriber->poll_query_until('postgres',
388-
"SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication worker'"
388+
"SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication apply worker'"
389389
);
390390
$node_subscriber->safe_psql(
391391
'postgres', "
@@ -434,7 +434,7 @@
434434
$node_subscriber->safe_psql('postgres',
435435
"ALTER SUBSCRIPTION tap_sub_copy DISABLE;");
436436
$node_subscriber->poll_query_until('postgres',
437-
"SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication worker'"
437+
"SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication apply worker'"
438438
);
439439
$node_subscriber->safe_psql(
440440
'postgres', "

0 commit comments

Comments
 (0)