Re: Conflict Detection and Resolution

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Ajin Cherian <itsajin(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Subject: Re: Conflict Detection and Resolution
Date: 2024-09-09 09:45:22
Message-ID: CABdArM7MzqYT=H8va0zpXGS4xbV6X3HMzybe+X9SCYAqOJqP3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 6, 2024 at 2:05 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
>
>
> On Thu, Aug 29, 2024 at 2:50 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>>
>> On Wed, Aug 28, 2024 at 4:07 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>> >
>> > > On Wed, Aug 28, 2024 at 10:30 AM Ajin Cherian <itsajin(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2024-09-09 09:49:11 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Previous Message Richard Guo 2024-09-09 09:39:24 Why don't we consider explicit Incremental Sort?