From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Standardize rmgrdesc recovery conflict XID output.
Date: Thu, 17 Nov 2022 22:57:12 +0000
Message-ID: <E1ovnom-000f4c-61@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie
Subject: Re: pgsql: Standardize rmgrdesc recovery conflict XID output.
In-Reply-To: <E1ovnom-000f4c-61@gemulon.postgresql.org>
References: <E1ovnom-000f4c-61@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox