RE: Conflict detection and logging in logical replication

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

From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>
Cc: shveta malik <shveta.malik@gmail.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-01T06:09:41Z
Lists: pgsql-hackers

Attachments

On Thursday, August 1, 2024 11:40 AM Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
> Here is the V9 patch set which addressed above and Shveta's comments.
> 

The patch conflict with a recent commit a67da49, so here is rebased V10 patch set. 

Thanks to the commit a67da49, I have removed the special check for
cross-partition update in apply_handle_delete_internal() because this function
will not be called in cross-update anymore.

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.