Re: Conflict detection and logging in logical replication
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>,
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-01T11:53:16Z
Lists: pgsql-hackers
On Thu, Aug 1, 2024 at 2:26 PM Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote: > > 04. general > > According to the documentation [1], there is another constraint "exclude", which > can cause another type of conflict. But this pattern cannot be logged in detail. > As per docs, "exclusion constraints can specify constraints that are more general than simple equality", so I don't think it satisfies the kind of conflicts we are trying to LOG and then in the future patch allows automatic resolution for the same. For example, when we have last_update_wins strategy, we will replace the rows with remote rows when the key column values match which shouldn't be true in general for exclusion constraints. Similarly, we don't want to consider other constraint violations like CHECK to consider as conflicts. We can always extend the basic functionality for more conflicts if required but let's go with reporting straight-forward stuff first. -- With Regards, Amit Kapila.
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