pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Assert in init_toast_snapshot() that some snapshot registered or
Date: Mon, 21 Feb 2022 18:35:29 +0000
Message-ID: <E1nMDX0-0001MN-8E@gemulon.postgresql.org> (raw)

Assert in init_toast_snapshot() that some snapshot registered or active.

Commit <FIXME> fixed the bug that RemoveTempRelationsCallback() did not
push/register a snapshot. That only went unnoticed because often a valid
catalog snapshot exists and is returned by GetOldestSnapshot(). But due to
invalidation processing that is not reliable.

Thus assert in init_toast_snapshot() that there is a registered or active
snapshot, using the new HaveRegisteredOrActiveSnapshot().

Author: Andres Freund
Discussion: https://postgr.es/m/20220219180002.6tubjq7iw7m52bgd@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2776922201f751e3202a713b61d97fe4e44a8440

Modified Files
--------------
src/backend/access/common/toast_internals.c |  9 +++++++++
src/backend/utils/time/snapmgr.c            | 26 ++++++++++++++++++++++++++
src/include/utils/snapmgr.h                 |  1 +
3 files changed, 36 insertions(+)



Message-ID: <E1nMDX0-0001MN-8E@gemulon.postgresql.org>
Permalink:  ../E1nMDX0-0001MN-8E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nMDX0-0001MN-8E@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 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: andres@anarazel.de
  Subject: Re: pgsql: Assert in init_toast_snapshot() that some snapshot registered or
  In-Reply-To: <E1nMDX0-0001MN-8E@gemulon.postgresql.org>
  References: <E1nMDX0-0001MN-8E@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