pgsql: Standardize rmgrdesc recovery conflict XID output. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Standardize rmgrdesc recovery conflict XID output.
Date
Msg-id E1ovnom-000f4c-61@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1489b1ce728248e04da72aa32f87e9a634ebf9b8

Modified Files
--------------
src/backend/access/gist/gist.c         |  6 +--
src/backend/access/gist/gistxlog.c     | 17 ++++----
src/backend/access/hash/hash_xlog.c    |  3 +-
src/backend/access/hash/hashinsert.c   | 10 ++---
src/backend/access/heap/heapam.c       | 76 +++++++++++++++++++---------------
src/backend/access/heap/pruneheap.c    | 14 +++----
src/backend/access/index/genam.c       | 21 +++++-----
src/backend/access/nbtree/README       |  8 ++--
src/backend/access/nbtree/nbtpage.c    | 29 ++++++-------
src/backend/access/nbtree/nbtxlog.c    |  7 ++--
src/backend/access/rmgrdesc/gistdesc.c | 10 ++---
src/backend/access/rmgrdesc/hashdesc.c |  4 +-
src/backend/access/rmgrdesc/heapdesc.c | 12 +++---
src/backend/access/rmgrdesc/nbtdesc.c  | 11 ++---
src/backend/access/rmgrdesc/spgdesc.c  |  4 +-
src/backend/access/spgist/spgvacuum.c  |  8 ++--
src/backend/access/spgist/spgxlog.c    | 11 ++---
src/backend/storage/ipc/procarray.c    | 11 +++--
src/backend/storage/ipc/standby.c      | 27 ++++++++----
src/include/access/gist_private.h      |  4 +-
src/include/access/gistxlog.h          |  6 +--
src/include/access/hash_xlog.h         |  2 +-
src/include/access/heapam_xlog.h       | 14 ++++---
src/include/access/nbtxlog.h           |  6 +--
src/include/access/spgxlog.h           |  2 +-
src/include/access/tableam.h           |  2 +-
src/include/storage/standby.h          |  4 +-
27 files changed, 179 insertions(+), 150 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().
Next
From: Andres Freund
Date:
Subject: pgsql: ci: Add task testing windows with mingw