Re: existing row not found by SELECT ... WHERE CTID = ? - Mailing list pgsql-general

From Tom Lane
Subject Re: existing row not found by SELECT ... WHERE CTID = ?
Date
Msg-id 2305902.1653580955@sss.pgh.pa.us
Whole thread Raw
In response to Re: existing row not found by SELECT ... WHERE CTID = ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: existing row not found by SELECT ... WHERE CTID = ?
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thursday, May 26, 2022, Matthias Apitz <guru@unixarea.de> wrote:
>> Is there any way to get with the old CTID to the row, for example with
>> the old CTID to the new one which the row now has after the update of the
>> row?

> No, there is no link between old and new in the main table.

There is a forward link from the old CTID to the new, but we don't
provide any user-accessible way to use it.  I wonder though if the
OP should be considering using SELECT FOR UPDATE in his cursor,
so that it'd automatically chain up to the newest row version.

            regards, tom lane



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: pg_create_logical_replication_slot in DB1 is blocked by a session in DB2