From d49d4107150a4711c057f37e6b426fa965b66394 Mon Sep 17 00:00:00 2001 From: Hayato Kuroda Date: Tue, 8 Sep 2026 12:25:01 +0900 Subject: [PATCH] Stabilize 035_conflicts.pl 6168c65 added a test to verify that the conflict detection slot preserves an in-progress transaction. However, it used query_until(), which can return before starting a transaction, allowing the test to proceed without a pinned xid. Use query_safe() so the transaction setup completes synchronously and the xid is assigned before the xmin checks run. Per buildfarm bushmaster and canebrake. --- src/test/subscription/t/035_conflicts.pl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/test/subscription/t/035_conflicts.pl b/src/test/subscription/t/035_conflicts.pl index d57cbe05cd7..5804e38ed69 100644 --- a/src/test/subscription/t/035_conflicts.pl +++ b/src/test/subscription/t/035_conflicts.pl @@ -667,9 +667,7 @@ $node_B->safe_psql('dbb', "CREATE TABLE tab (a int PRIMARY KEY, b int)"); # Hold a transaction with an assigned transaction ID open in dbb, pinning its # oldest active transaction ID. my $dbb_session = $node_B->background_psql('dbb'); -$dbb_session->query_until( - qr/starting_bg_psql/, q{ - \echo starting_bg_psql +$dbb_session->query_safe(q{ BEGIN; SELECT txid_current(); }); @@ -704,11 +702,7 @@ ok( $node_B->poll_query_until( # Once the pinned transaction commits, the xmin must be able to advance # again. -$dbb_session->query_until( - qr/committed/, q{ - COMMIT; - \echo committed -}); +$dbb_session->query_safe("COMMIT;"); ok($dbb_session->quit, 'close pinned session'); $next_xid = $node_B->safe_psql('postgres', "SELECT txid_current() + 1"); -- 2.52.0