Re: lifetime of the old CTID

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: lifetime of the old CTID
Дата
Msg-id 20220706135354.e7nxo2vyrxwqlkce@hjp.at
обсуждение исходный текст
Ответ на Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
Ответы Re: lifetime of the old CTID  (Matthias Apitz <guru@unixarea.de>)
Список 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!"

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: lifetime of the old CTID
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: ADD COLUMN ts tsvector GENERATED too slow