]> granicus.if.org Git - postgresql/commit
Ignore nextOid when replaying an ONLINE checkpoint.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Apr 2018 22:11:30 +0000 (18:11 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 11 Apr 2018 22:11:30 +0000 (18:11 -0400)
commitefbe36a2c1b03d244772865210f1c433043cdd22
treeaca6ae85f79127b20692473f6c4143b2da003e8b
parent3767216fbdb39fddc7fbb94a2e06965c98dbe697
Ignore nextOid when replaying an ONLINE checkpoint.

The nextOid value is from the start of the checkpoint and may well be stale
compared to values from more recent XLOG_NEXTOID records.  Previously, we
adopted it anyway, allowing the OID counter to go backwards during a crash.
While this should be harmless, it contributed to the severity of the bug
fixed in commit 0408e1ed5, by allowing duplicate TOAST OIDs to be assigned
immediately following a crash.  Without this error, that issue would only
have arisen when TOAST objects just younger than a multiple of 2^32 OIDs
were deleted and then not vacuumed in time to avoid a conflict.

Pavan Deolasee

Discussion: https://postgr.es/m/CABOikdOgWT2hHkYG3Wwo2cyZJq2zfs1FH0FgX-=h4OLosXHf9w@mail.gmail.com
src/backend/access/transam/xlog.c