Stabilize xid_wraparound tests
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 30 Jul 2024 10:17:48 +0000 (06:17 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 30 Jul 2024 10:26:36 +0000 (06:26 -0400)
commit787ea8c9d812e5ae76b7a8981e5f93cee80c8a36
treee2df4a77bae4b203adfa91b2a0f4aac21022b582
parente5ba6a5ab62ce05e2a762b4d26f0fd0c52c7b521
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.
src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl
src/test/modules/xid_wraparound/t/002_limits.pl
src/test/modules/xid_wraparound/t/003_wraparounds.pl