Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, "Drouvot, Bertrand" <bdrouvot@amazon.com>,
Andres Freund <andres@anarazel.de>, Justin Pryzby <pryzby@telsasoft.com>, Noah Misch <noah@leadboat.com>, Jason Harvey <jason@reddit.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>, "Tharakan, Robins" <tharar@amazon.com>
Date: 2022-07-05T19:41:00Z
Lists: pgsql-hackers, pgsql-general
On Tue, Jul 5, 2022 at 11:53 AM Andrew Dunstan <andrew@dunslane.net> wrote: > > Sure enough, 8.4's pg_controldata doesn't print anything about > > oldestXID, because that info wasn't there then. > > > > Given the lack of field complaints, it's probably not worth trying > > to do anything to restore that capability. But we really ought to > > update pg_upgrade's code and docs in pre-v15 branches to say that > > the minimum supported source version is 9.0. > > > So it's taken us a year to discover the issue :-( I'm not surprised at all, given the history here. There were at least a couple of bugs affecting how pg_upgrade carries forward information about these cutoffs. See commits 74cf7d46 and a61daa14. Actually, commit 74cf7d46 was where pg_resetxlog/pg_resetwal's -u argument was first added, for use by pg_upgrade. That commit is only about a year old, and was only backpatched to 9.6. Unfortunately the previous approach to carrying forward oldestXID was an accident that usually worked. So...yeah, things are bad here. At least we now have the ability to detect any downstream problems that this might cause by using pg_amcheck. -- Peter Geoghegan
Commits
-
Refuse upgrades from pre-9.0 clusters
- ccf3408cff53 14.13 landed
- bcd2be0c2f7e 12.20 landed
- b030697d36d5 13.16 landed
-
pg_resetxlog: add option to set oldest xid & use by pg_upgrade
- 74cf7d46a91d 15.0 cited
-
Stamp 11.2.
- 6cd404b344f7 11.2 cited
-
Track the current XID wrap limit (or more accurately, the oldest unfrozen
- 25ec228ef760 9.0.0 cited