Re: lifetime of the old CTID - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: lifetime of the old CTID
Date
Msg-id 20220706135354.e7nxo2vyrxwqlkce@hjp.at
Whole thread Raw
In response to Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
Responses Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
List pgsql-general
On 2022-07-06 14:26:00 +0200, Matthias Apitz wrote:
> DB layer must LOCK the row for update. It does so using the CTID. Of
> course there is a key in the row (d01gsi, the signature of the book),
> but this is not uniqu and can't be used to lock exactly this row for
> update.

If it isn't unique it is *not* a key. If your tables don't have a
primary key you should seriously rethink the data model.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: lifetime of the old CTID
Next
From: Francisco Olarte
Date:
Subject: Re: ADD COLUMN ts tsvector GENERATED too slow