Re: Conflict detection and logging in logical replication - Mailing list pgsql-hackers

From shveta malik
Subject Re: Conflict detection and logging in logical replication
Date
Msg-id CAJpy0uDUNigg86KRnk4A0KjwY8-pPaXzZ2eCjnb1ydCH48VzJQ@mail.gmail.com
Whole thread Raw
In response to RE: Conflict detection and logging in logical replication  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
Responses RE: Conflict detection and logging in logical replication
List pgsql-hackers
On Tue, Aug 20, 2024 at 4:45 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:
>
> Here are the remaining patches.
>
> 0001 adds additional doc to explain the log format.

Thanks for the patch. Please find few comments on 001:

1)
+<literal>Key</literal> (column_name, ...)=(column_name, ...);
existing local tuple (column_name, ...)=(column_name, ...); remote
tuple (column_name, ...)=(column_name, ...); replica identity
(column_name, ...)=(column_name, ...).

-- column_name --> column_value everywhere in right to '='?

2)
+      Note that for an
+      update operation, the column value of the new tuple may be NULL if the
+      value is unchanged.

-- Shall we mention the toast value here? In all other cases, we get a
full new tuple.

3)
+      The key section in the second sentence of the DETAIL line
includes the key values of the tuple that already exists in the local
relation for insert_exists or update_exists conflicts.

-- Shall we mention the key is the column value violating a unique
constraint? Something like this:
The key section in the second sentence of the DETAIL line includes the
key values of the local tuple that violates unique constraint for
insert_exists or update_exists conflicts.

4)
Shall we give an example LOG message in the end?

thanks
Shveta



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Next
From: Amit Kapila
Date:
Subject: Re: Fix memory counter update in reorderbuffer