From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: xid_wraparound/002_limits.pl might fail due to transient warning
Date: Tue, 01 Sep 2026 23:03:07 -0400
Message-ID: <1306023.1788318187@sss.pgh.pa.us> (raw)
In-Reply-To: <7a68bee2-91bd-481d-be44-160e6beebc83@gmail.com>
References: <7a68bee2-91bd-481d-be44-160e6beebc83@gmail.com>
Alexander Lakhin <exclusion@gmail.com> writes:
> Hello hackers,
> New buildfarm animal partridge (aarch64, maybe with slow storage)
> produced several unprecedented failures of 002_limits, e.g., [1], [2]:
I went looking at this tonight and then found your message. I think
the reason we're not seeing a lot of these in the buildfarm is that
not that many animals are running this test suite (it requires putting
xid_wraparound in PG_TEST_EXTRA). I concur with your conclusion that
poll_query_until is iterating the INSERT an extra time, but I think
a less magic solution would be to just change the test's match rule
to allow that to happen, more or less as attached.
regards, tom lane
Attachments:stabilize-002_limits-wraparound-test.patch (text/x-diff, 1.0K) downloaddiff --git a/src/test/modules/xid_wraparound/t/002_limits.pl b/src/test/modules/xid_wraparound/t/002_limits.plindex 29d071a677b..ca2604d0c0d 100644--- a/src/test/modules/xid_wraparound/t/002_limits.pl+++ b/src/test/modules/xid_wraparound/t/002_limits.pl@@ -126,14 +126,20 @@ $ret =
qq[INSERT INTO wraparoundtest VALUES ('after VACUUM')],
'INSERT 0 1');
-# Check the table contents+# Check the table contents. It's possible for more than one "after VACUUM"+# entry to appear, because there is a window where the preceding INSERT will+# succeed but also produce a warning message about impending wraparound.+# poll_query_until won't accept that as a valid result, so it iterates an+# additional time or times until the INSERT succeeds cleanly. So, we use+# a "like" test that won't complain about extra data.
$ret = $node->safe_psql('postgres', qq[SELECT * from wraparoundtest]);
-is( $ret, "start+like(+ $ret, qr/^start
oldxact
after 1 billion
after 2 billion
reached warn-limit
-after VACUUM");+after VACUUM/);
$node->stop;
done_testing();
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com
Subject: Re: xid_wraparound/002_limits.pl might fail due to transient warning
In-Reply-To: <1306023.1788318187@sss.pgh.pa.us>
References: <7a68bee2-91bd-481d-be44-160e6beebc83@gmail.com> <1306023.1788318187@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox