From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
Date: Tue, 24 May 2022 12:11:49 -0400
Message-ID: <1652228.1653408709@sss.pgh.pa.us> (raw)
In-Reply-To: <f13384d06765428071c47c143e0d5428f2d59d30.camel@cybertec.at>
References: <YozvP4+Nl9gR+Jg1@c720-r368166>
<f13384d06765428071c47c143e0d5428f2d59d30.camel@cybertec.at>
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> It may well be that somebody deleted or updated a few rows between the time
> the cursor was materialized and the time the 50000th row was fetched.
Even without HOLD, a cursor will return a view of the data as it stood
when the cursor was opened, just as a plain SELECT does. There is
*plenty* of time for another session to get in there if you've been
groveling through 50K records one at a time.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, guru@unixarea.de
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
In-Reply-To: <1652228.1653408709@sss.pgh.pa.us>
References: <YozvP4+Nl9gR+Jg1@c720-r368166> <f13384d06765428071c47c143e0d5428f2d59d30.camel@cybertec.at> <1652228.1653408709@sss.pgh.pa.us>
* 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