]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve errdetail for logical replication conflict messages.
authorAmit Kapila <akapila@postgresql.org>
Wed, 21 Jan 2026 04:58:03 +0000 (04:58 +0000)
committerAmit Kapila <akapila@postgresql.org>
Wed, 21 Jan 2026 04:58:03 +0000 (04:58 +0000)
commit48efefa6caacba49ca5b7b84e20c900776e56c50
treec8eb90605385393ca9cf4e8e3e5f08f8e7320739
parent905ef401d5e068a1e6d246f9d96435c9d750c8be
Improve errdetail for logical replication conflict messages.

This change enhances the clarity and usefulness of error detail messages
generated during logical replication conflicts. The following improvements
have been made:

1. Eliminate redundant output: Avoid printing duplicate remote row and
replica identity values for the multiple_unique_conflicts conflict type.
2. Improve message structure: Append tuple values directly to the main
error message, separated by a colon (:), for better readability.
3. Simplify local row terminology: Remove the word 'existing' when
referring to the local row, as this is already implied by context.
4. General code refinements: Apply miscellaneous code cleanups to improve
how conflict detail messages are constructed and formatted.

Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Discussion: https://postgr.es/m/CAHut+Psgkwy5-yGRJC15izecySGGysrbCszv_z93ess8XtCDOQ@mail.gmail.com
doc/src/sgml/logical-replication.sgml
src/backend/replication/logical/conflict.c
src/include/replication/conflict.h
src/test/subscription/t/001_rep_changes.pl
src/test/subscription/t/013_partition.pl
src/test/subscription/t/029_on_error.pl
src/test/subscription/t/030_origin.pl
src/test/subscription/t/035_conflicts.pl