Re: existing row not found by SELECT ... WHERE CTID = ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Matthias Apitz <guru(at)unixarea(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
Date: 2022-05-24 16:11:49
Message-ID: 1652228.1653408709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-05-24 16:16:09 Re: About psql \dt unable display same name table which have different schema
Previous Message 徐志宇徐 2022-05-24 15:59:51 About psql \dt unable display same name table which have different schema