pgsql: Stabilize xid_wraparound tests

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Stabilize xid_wraparound tests
Date: 2024-07-30 10:27:48
Message-ID: E1sYk56-001sOz-Hv@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Stabilize xid_wraparound tests

The tests had a race condition if autovacuum was set to off. Instead we
create all the tables we are interested in with autovacuum disabled, so
they are only ever touched when in danger of wraparound.

Discussion: https://postgr.es/m/3e2cbd24-f45e-4b2b-ba83-8149214f0a4d@dunslane.net

Masahiko Sawada (slightly tweaked by me)

Backpatch to release 17 where these tests were introduced.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/800cd3e923597172a29aba49da45753f52996ee8

Modified Files
--------------
.../xid_wraparound/t/001_emergency_vacuum.pl | 28 ++++++++++------------
src/test/modules/xid_wraparound/t/002_limits.pl | 6 ++---
.../modules/xid_wraparound/t/003_wraparounds.pl | 6 ++---
3 files changed, 19 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2024-07-30 10:27:49 pgsql: Stabilize xid_wraparound tests
Previous Message Amit Kapila 2024-07-30 09:01:00 pgsql: pg_createsubscriber: Fix an unpredictable recovery wait time.