From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
Date: Thu, 26 May 2022 12:02:35 -0400
Message-ID: <2305902.1653580955@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbrHi0ndyCfuSZLto9saOBw-Rd=EdtufCOD=0_3iiZy2A@mail.gmail.com>
References: <YozvP4+Nl9gR+Jg1@c720-r368166>
<f13384d06765428071c47c143e0d5428f2d59d30.camel@cybertec.at>
<1652228.1653408709@sss.pgh.pa.us>
<Yo31JTTUm1S/R2k/@pureos>
<Yo+Y7E3r29d8tDu1@pureos>
<CAKFQuwbrHi0ndyCfuSZLto9saOBw-Rd=EdtufCOD=0_3iiZy2A@mail.gmail.com>
"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
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, david.g.johnston@gmail.com, guru@unixarea.de, laurenz.albe@cybertec.at
Subject: Re: existing row not found by SELECT ... WHERE CTID = ?
In-Reply-To: <2305902.1653580955@sss.pgh.pa.us>
References: <YozvP4+Nl9gR+Jg1@c720-r368166> <f13384d06765428071c47c143e0d5428f2d59d30.camel@cybertec.at> <1652228.1653408709@sss.pgh.pa.us> <Yo31JTTUm1S/R2k/@pureos> <Yo+Y7E3r29d8tDu1@pureos> <CAKFQuwbrHi0ndyCfuSZLto9saOBw-Rd=EdtufCOD=0_3iiZy2A@mail.gmail.com> <2305902.1653580955@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