Re: Conflict detection for multiple_unique_conflicts in logical replication - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Conflict detection for multiple_unique_conflicts in logical replication
Date
Msg-id CAHut+PvFdHOor1oqb+8nWfaeTPnWQcv0YttcUp3_=4p2nOEQ4w@mail.gmail.com
Whole thread Raw
In response to Re: Conflict detection for multiple_unique_conflicts in logical replication  (Nisha Moond <nisha.moond412@gmail.com>)
Responses Re: Conflict detection for multiple_unique_conflicts in logical replication
List pgsql-hackers
Hi Nisha,

I saw this patch was already pushed [1], but there was one thing I
never quite understood about this feature, and I didn't find the
answer in the thread posts above.

My question: Why is there only a single new conflict type being added here?

e.g.

Conflict due to INSERT
- single conflict ==> 'insert_exists'
- multiple conflicts ==> 'multiple_unique_conflicts'

Conflict due to UPDATE
- single conflict ==> 'update_exists'
- multiple conflicts ==> 'multiple_unique_conflicts'

My point is, if it is deemed useful for a user to know if a *single*
conflict was caused by an INSERT or by an UPDATE, then why is it not
equally useful to know if *multiple* conflicts were caused by an
INSERT or by an UPDATE?

In other words, instead of just 'multiple_unique_conflicts', why
wasn't this new conflict type split into two, something like
'insert_multiple_conflicts' and 'update_multiple_conflicts'?

======
[1] https://github.com/postgres/postgres/commit/73eba5004a06a744b6b8570e42432b9e9f75997b

Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Sergey Tatarintsev
Date:
Subject: Re: Restrict publishing of partitioned table with a foreign table as partition
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Some codes refer slot()->{'slot_name'} but it is not defined