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 09:13:54 -0700
Message-ID: <20210512161354.6msdekb4chsmpceh@alap3.anarazel.de> (raw)
In-Reply-To: <1099600.1620835210@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>
<20210512155153.qb6dpsg56doicg57@alap3.anarazel.de>
<1099600.1620835210@sss.pgh.pa.us>
Hi,
On 2021-05-12 12:00:10 -0400, Tom Lane wrote:
> Yeah, on further thought, the real question to be asking here is
> "what's protecting that in-flight datum from becoming a dangling
> pointer?". AFAICT, the answer right now is "nothing". Therefore,
> it is *never* okay for plpgsql to be executing without a registered
> transaction snapshot; and it seems quite unlikely that it'd be any
> safer for any other PL.
A bit independently of this concrete issue, I wonder if we could make it
easier to detect such bugs. If we somehowâ„¢ associated an xmin horizon
with toasted datums, we could then assert before dereferencing that we
still guarantee that such a reference is still valid. The "somehow" part
obviously isn't entirely trivial, but it seems we could hack it by
encoding it as a different vartag?
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: <20210512161354.6msdekb4chsmpceh@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