Standardize rmgrdesc recovery conflict XID output.
commit1489b1ce728248e04da72aa32f87e9a634ebf9b8
authorPeter Geoghegan <pg@bowt.ie>
Thu, 17 Nov 2022 22:55:08 +0000 (17 14:55 -0800)
committerPeter Geoghegan <pg@bowt.ie>
Thu, 17 Nov 2022 22:55:08 +0000 (17 14:55 -0800)
tree4a95eb7c2ffc0424f8805056c36b3493019313be
parent6ff5aa129933fbde034c0d21c28cf05e052511f9
Standardize rmgrdesc recovery conflict XID output.

Standardize on the name snapshotConflictHorizon for all XID fields from
WAL records that generate recovery conflicts when in hot standby mode.
This supersedes the previous latestRemovedXid naming convention.

The new naming convention places emphasis on how the values are actually
used by REDO routines.  How the values are generated during original
execution (details of which vary by record type) is deemphasized.  Users
of tools like pg_waldump can now grep for snapshotConflictHorizon to see
all potential sources of recovery conflicts in a standardized way,
without necessarily having to consider which specific record types might
be involved.

Also bring a couple of WAL record types that didn't follow any kind of
naming convention into line.  These are heapam's VISIBLE record type and
SP-GiST's VACUUM_REDIRECT record type.  Now every WAL record whose REDO
routine calls ResolveRecoveryConflictWithSnapshot() passes through the
snapshotConflictHorizon field from its WAL record.  This is follow-up
work to the refactoring from commit 9e540599 that made FREEZE_PAGE WAL
records use a standard snapshotConflictHorizon style XID cutoff.

No bump in XLOG_PAGE_MAGIC, since the underlying format of affected WAL
records doesn't change.

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAH2-Wzm2CQUmViUq7Opgk=McVREHSOorYaAjR1ZpLYkRN7_dPw@mail.gmail.com
27 files changed:
src/backend/access/gist/gist.c
src/backend/access/gist/gistxlog.c
src/backend/access/hash/hash_xlog.c
src/backend/access/hash/hashinsert.c
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/index/genam.c
src/backend/access/nbtree/README
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtxlog.c
src/backend/access/rmgrdesc/gistdesc.c
src/backend/access/rmgrdesc/hashdesc.c
src/backend/access/rmgrdesc/heapdesc.c
src/backend/access/rmgrdesc/nbtdesc.c
src/backend/access/rmgrdesc/spgdesc.c
src/backend/access/spgist/spgvacuum.c
src/backend/access/spgist/spgxlog.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c
src/include/access/gist_private.h
src/include/access/gistxlog.h
src/include/access/hash_xlog.h
src/include/access/heapam_xlog.h
src/include/access/nbtxlog.h
src/include/access/spgxlog.h
src/include/access/tableam.h
src/include/storage/standby.h