postgres.git / summary / log / commit / refs
commit d2384bc30f6882d30cb49e2912580ab95d642f3c
Author: Amit Kapila <akapila@postgresql.org>
Date: Tue Sep 08 05:15:33 2026 +0000
First released in: 19.0
Fix buildfarm failure introduced by 6168c65ddc.
Commit 6168c65ddc added a test verifying that the conflict detection
slot's xmin regresses to the horizon pinned by an in-progress transaction
in the database of a newly added subscription that has retain_dead_tuples
enabled. 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.
Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/OS9PR01MB12149257A97EE1BD3296F6AEBF5B12@OS9PR01MB12149.jpnprd01.prod.outlook.com
Backpatch-through: 19
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 ff9f4c9b760..f0ee5e32fc8 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");
[parent: 729e4a322786]