Re: Conflict Detection and Resolution - Mailing list pgsql-hackers

From Nisha Moond
Subject Re: Conflict Detection and Resolution
Date
Msg-id CABdArM7MzqYT=H8va0zpXGS4xbV6X3HMzybe+X9SCYAqOJqP3w@mail.gmail.com
Whole thread Raw
In response to Conflict Detection and Resolution  (shveta malik <shveta.malik@gmail.com>)
List pgsql-hackers
On Fri, Sep 6, 2024 at 2:05 PM Ajin Cherian <itsajin@gmail.com> wrote:
>
>
>
> On Thu, Aug 29, 2024 at 2:50 PM shveta malik <shveta.malik@gmail.com> wrote:
>>
>> On Wed, Aug 28, 2024 at 4:07 PM shveta malik <shveta.malik@gmail.com> wrote:
>> >
>> > > On Wed, Aug 28, 2024 at 10:30 AM Ajin Cherian <itsajin@gmail.com> wrote:
>> > > >
>> >
>> > The review is WIP. Please find a few comments on patch001.
>> >
>>
>> More comments on ptach001 in continuation of previous comments:
>>
>
> Thank you for your feedback, Shveta. I've addressed both sets of comments you provided.

Thanks for the patches. I tested the v12-0001 patch, and here are my comments:

1) An unexpected error occurs when attempting to alter the resolver
for multiple conflict_type(s) in ALTER SUB...CONFLICT RESOLVER
command. See below examples :

postgres=#  alter subscription sub2 CONFLICT RESOLVER
(update_exists=keep_local,  delete_missing=error,
update_origin_differs=error);
ERROR:  unrecognized node type: 1633972341

postgres=#  alter subscription sub2 CONFLICT RESOLVER (
update_origin_differs=error, update_exists=error);
ERROR:  unrecognized node type: 1633972341

postgres=#  alter subscription sub2 CONFLICT RESOLVER (
delete_origin_differs=error, delete_missing=error);
ERROR:  unrecognized node type: 1701602660

postgres=#  alter subscription sub2 CONFLICT RESOLVER
(update_exists=keep_local,  delete_missing=error);
ALTER SUBSCRIPTION

-- It appears that the error occurs only when at least two conflict
types belong to the same category, either UPDATE or DELETE.

2) Given the above issue, it would be beneficial to add a test in
subscription.sql to cover cases where all valid conflict types are set
with appropriate resolvers in both the ALTER and CREATE commands.

Thanks,
Nisha



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Why don't we consider explicit Incremental Sort?
Next
From: Ashutosh Bapat
Date:
Subject: Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN