Skip to content

Commit 22cd40b

Browse files
committed
Expand SPOCK_CT_INSERT_EXISTS comment with check_all_uc_indexes semantics
1 parent dda0644 commit 22cd40b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

include/spock_conflict.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ extern bool spock_save_resolutions;
5050
*/
5151
typedef enum
5252
{
53-
/* The row to be inserted violates unique constraint */
53+
/*
54+
* The row to be inserted violates a unique constraint.
55+
* This behaviour is controlled by GUC check_all_uc_indexes (default OFF).
56+
* When ON, this conflict exactly matches PostgreSQL's INSERT_EXISTS
57+
* conflict and Spock attempts to resolve it when any UNIQUE index rejects
58+
* the insertion. It is counted as a conflict in subscription statistics
59+
* and the exception log. When OFF, only a replica identity index
60+
* violation is counted as a conflict; other index violations cause an
61+
* ERROR and are not counted as conflicts.
62+
*/
5463
SPOCK_CT_INSERT_EXISTS,
5564

5665
/* The row to be updated was modified by a different origin */

0 commit comments

Comments
 (0)