pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove remants of "snapshot too old"
Date: Mon, 09 Dec 2024 16:17:48 +0000
Message-ID: <E1tKgSC-001tWz-2t@gemulon.postgresql.org> (raw)

Remove remants of "snapshot too old"

Remove the 'whenTaken' and 'lsn' fields from SnapshotData. After the
removal of the "snapshot too old" feature, they were never set to a
non-zero value.

This largely reverts commit 3e2f3c2e423, which added the
OldestActiveSnapshot tracking, and the init_toast_snapshot()
function. That was only required for setting the 'whenTaken' and 'lsn'
fields. SnapshotToast is now a constant again, like SnapshotSelf and
SnapshotAny. I kept a thin get_toast_snapshot() wrapper around
SnapshotToast though, to check that you have a registered or active
snapshot. That's still a useful sanity check.

Reviewed-by: Nathan Bossart, Andres Freund, Tom Lane
Discussion: https://www.postgresql.org/message-id/cd4b4f8c-e63a-41c0-95f6-6e6cd9b83f6d@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4d8275046c36792afb3604677c0a53c8530388ae

Modified Files
--------------
contrib/amcheck/verify_heapam.c             |  4 +--
src/backend/access/common/toast_internals.c | 51 ++++++++++-----------------
src/backend/access/heap/heaptoast.c         |  4 +--
src/backend/storage/ipc/procarray.c         |  4 ---
src/backend/utils/time/snapmgr.c            | 54 +----------------------------
src/include/access/genam.h                  |  2 ++
src/include/access/toast_internals.h        |  2 +-
src/include/storage/predicate.h             |  1 +
src/include/utils/snapmgr.h                 | 13 ++-----
src/include/utils/snapshot.h                |  7 ----
10 files changed, 28 insertions(+), 114 deletions(-)



Message-ID: <E1tKgSC-001tWz-2t@gemulon.postgresql.org>
Permalink:  ../E1tKgSC-001tWz-2t@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tKgSC-001tWz-2t@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove remants of "snapshot too old"
  In-Reply-To: <E1tKgSC-001tWz-2t@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