RE: Conflict detection and logging in logical replication

Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>

From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: shveta malik <shveta.malik@gmail.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>
Date: 2024-08-21T09:32:23Z
Lists: pgsql-hackers
On Wednesday, August 21, 2024 11:40 AM shveta malik <shveta.malik@gmail.com> wrote:
> 
> On Tue, Aug 20, 2024 at 4:45 PM Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
> wrote:> 

Thanks for the comments!

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

I feel the current insert_exists log in conflict section seems
sufficient as an example to show the real conflict log.

Other comments look good, and I will address.

Best Regards,
Hou zj

Commits

  1. Rename the conflict types for the origin differ cases.

  2. Doc: explain the log format of logical replication conflicts.

  3. Log the conflicts while applying changes in logical replication.

  4. Avoid duplicate table scans for cross-partition updates during logical replication.