Re: Conflict detection and logging in logical replication
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
Nisha Moond <nisha.moond412@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>,
Dilip Kumar <dilipbalaut@gmail.com>, Jan Wieck <jan@wi3ck.info>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, shveta malik <shveta.malik@gmail.com>
Date: 2024-08-21T03:39:32Z
Lists: 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
Commits
-
Rename the conflict types for the origin differ cases.
- 640178c92e3f 18.0 landed
-
Doc: explain the log format of logical replication conflicts.
- edcb71258504 18.0 landed
-
Log the conflicts while applying changes in logical replication.
- 9758174e2e5c 18.0 landed
-
Avoid duplicate table scans for cross-partition updates during logical replication.
- a67da49e1d98 18.0 cited