Re: Conflict Detection and Resolution

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Conflict Detection and Resolution
Дата
Msg-id CA+TgmobY38g0Hy6UM4FYjS4UxTdwwAGm4FgpAziKa9Z=qKX8ug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Conflict Detection and Resolution  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Conflict Detection and Resolution
Список pgsql-hackers
On Mon, Jun 17, 2024 at 1:42 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> The difference w.r.t the existing mechanisms for holding deleted data
> is that we don't know whether we need to hold off the vacuum from
> cleaning up the rows because we can't say with any certainty whether
> other nodes will perform any conflicting operations in the future.
> Using the example we discussed,
> Node A:
>   T1: INSERT INTO t (id, value) VALUES (1,1);
>   T2: DELETE FROM t WHERE id = 1;
>
> Node B:
>   T3: UPDATE t SET value = 2 WHERE id = 1;
>
> Say the order of receiving the commands is T1-T2-T3. We can't predict
> whether we will ever get T-3, so on what basis shall we try to prevent
> vacuum from removing the deleted row?

The problem arises because T2 and T3 might be applied out of order on
some nodes. Once either one of them has been applied on every node, no
further conflicts are possible.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Alena Rybakina
Дата:
Сообщение: Re: POC, WIP: OR-clause support for indexes
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Direct SSL connection and ALPN loose ends