Kuroda-San, I looked at the code. Currently it is slightly complicated. Can we please simplify it by removing different message-styles for a single conflict. For example MULTIPLE_UNIQUE_CONFLICTS has below:
1) When key and local rows are there: "Key %s already exists in unique index \"%s\", modified locally in transaction %u at %s: local row %s. When key is not there: "Unique index \"%s\" rejects applying due to local row %s, modified locally in transaction %u at %s." When local row is not there: "Key %s already exists in unique index \"%s\", modified locally in transaction %u at %s." When both key and local row is not there: Remote row violates unique constraint \"%s\", modified locally in transaction %u at %s." Can we try to construct message like this: (both key value and local row at the end) Key already exists in unique index "conf_tab_pkey", modified locally in transaction <..> at <...>: Key (a)=(2), local row (2, 2, 2), We can keep the message same for all 4 cases above. 2) Also there are many if-else blocks around the below type of message as well: DETAIL: Could not find the row to be updated by using replica identity (i)=(30): remote row (30, 300). If we instead have this: DETAIL: Could not find the row to be updated: replica identity (i)=(30), remote row (30, 300). Will it simplify the code, can you please check? thanks Shveta
