0001-Fix-random-failure-in-021_twophase.patch
text/x-patch
Filename: 0001-Fix-random-failure-in-021_twophase.patch
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: Fix random failure in 021_twophase.
| File | + | − |
|---|---|---|
| src/test/subscription/t/021_twophase.pl | 2 | 2 |
From 981cb77850f6576bf4f82ddad616623a3ef27ed8 Mon Sep 17 00:00:00 2001
From: Vignesh C <vignesh21@gmail.com>
Date: Tue, 30 Jul 2024 15:45:04 +0530
Subject: [PATCH] Fix random failure in 021_twophase.
After disabling the subscription, the failed test was changing two_phase
option for the subscription. We missed waiting for apply worker to exit
because of a wrong check.
---
src/test/subscription/t/021_twophase.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl
index a47d3b7dd6..5e50f1af33 100644
--- a/src/test/subscription/t/021_twophase.pl
+++ b/src/test/subscription/t/021_twophase.pl
@@ -385,7 +385,7 @@ is($result, qq(t), 'two-phase is enabled');
$node_subscriber->safe_psql('postgres',
"ALTER SUBSCRIPTION tap_sub_copy DISABLE;");
$node_subscriber->poll_query_until('postgres',
- "SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication worker'"
+ "SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication apply worker'"
);
$node_subscriber->safe_psql(
'postgres', "
@@ -434,7 +434,7 @@ is($result, qq(0), 'should be no prepared transactions on subscriber');
$node_subscriber->safe_psql('postgres',
"ALTER SUBSCRIPTION tap_sub_copy DISABLE;");
$node_subscriber->poll_query_until('postgres',
- "SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication worker'"
+ "SELECT count(*) = 0 FROM pg_stat_activity WHERE backend_type = 'logical replication apply worker'"
);
$node_subscriber->safe_psql(
'postgres', "
--
2.34.1