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

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


> No. PostgreSQL may remove a dead row, but a dead row is by definition
> no longer visible, so it wouldn't be found by a query.

I am wondering whether it is a good practice to use CTID in a where
clause. years ago when I use to code in Informix, using ROWID as a
generic substitute for primary key was discouraged precisely for the
same reason as described here for CTID. Sometimes rowid can change under
concurrent updates.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-05-25 14:35:17 Re: Connect to specific cluster on command line
Previous Message Carsten Klein 2022-05-25 14:30:06 Connect to specific cluster on command line