From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: a.wicht@gmail.com, pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: BUG #15990: PROCEDURE throws "SQL Error [XX000]: ERROR: no known snapshots" with PostGIS geometries
Date: Wed, 12 May 2021 08:51:53 -0700
Message-ID: <20210512155153.qb6dpsg56doicg57@alap3.anarazel.de> (raw)
In-Reply-To: <1097541.1620833866@sss.pgh.pa.us>
References: <15990-eee2ac466b11293d@postgresql.org>
<20190904105618.j5l6fhyesmprmstf@alap3.anarazel.de>
<912290.1620774094@sss.pgh.pa.us>
<957186.1620784871@sss.pgh.pa.us>
<1032535.1620789957@sss.pgh.pa.us>
<1097541.1620833866@sss.pgh.pa.us>
Hi,
On 2021-05-12 11:37:46 -0400, Tom Lane wrote:
> ISTM there are two ways we could look at this:
>
> 1. COMMIT is dropping the ball by not forcing there to be any
> registered transaction-level snapshot afterward. (Maybe it's
> not exactly COMMIT that must do this, but in any case the
> snapshot situation after COMMIT is clearly different from
> normal running, and that seems highly bug-prone.)
>
> 2. GetOldestSnapshot ought to be willing to fall back to
> CurrentSnapshot if FirstSnapshotSet is true but there are
> no active or registered snapshots. But it's not clear how
> its promises about returning the "oldest" snapshot would apply.
FirstSnapshotSet doesn't indicate the snapshot is usable, unless
IsolationUsesXactSnapshot() - in which case it also registers the
snapshot. We don't maintain MyProc->xmin outside of that, which I think
means we can't rely on the snapshot at all? Or am I missing something?
Greetings,
Andres Freund
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-bugs@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, robertmhaas@gmail.com, peter.eisentraut@enterprisedb.com
Subject: Re: BUG #15990: PROCEDURE throws "SQL Error [XX000]: ERROR: no known snapshots" with PostGIS geometries
In-Reply-To: <20210512155153.qb6dpsg56doicg57@alap3.anarazel.de>
* 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