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

From shveta malik
Subject Re: Conflict Detection and Resolution
Date
Msg-id CAJpy0uB9dX7rNWvK1CPbBnT9V=C2V7eBUMyseFfdpPnqEgOF7Q@mail.gmail.com
Whole thread Raw
In response to Re: Conflict Detection and Resolution  (Ajin Cherian <itsajin@gmail.com>)
Responses Re: Conflict Detection and Resolution
Re: Conflict Detection and Resolution
List pgsql-hackers
On Wed, Aug 28, 2024 at 10:30 AM Ajin Cherian <itsajin@gmail.com> wrote:
>
>> 2)
>> Currently pg_dump is dumping even the default resolvers configuration.
>> As an example if I have not changed default configuration for say
>> sub1, it still dumps all:
>>
>> CREATE SUBSCRIPTION sub1 CONNECTION '..' PUBLICATION pub1 WITH (....)
>> CONFLICT RESOLVER (insert_exists = 'error', update_differ =
>> 'apply_remote', update_exists = 'error', update_missing = 'skip',
>> delete_differ = 'apply_remote', delete_missing = 'skip');
>>
>> I am not sure if we need to dump default resolvers. Would like to know
>> what others think on this.
>>
>> 3)
>> Why in 002_pg_dump.pl we have default resolvers set explicitly?
>>
> In 003_pg_dump.pl, default resolvers are not set explicitly, that is the regexp to check the pg_dump generated
commandfor creating subscriptions. This is again connected to your 2nd question. 

Okay so we may not need this change if we plan to *not *dump defaults
in pg_dump.

Another point about 'defaults' is regarding insertion into the
pg_subscription_conflict table. We currently do insert default
resolvers into 'pg_subscription_conflict' even if the user has not
explicitly configured them. I think it is okay to insert defaults
there as the user will be able to know which resolver is picked for
any conflict type. But again, I would like to know the thoughts of
others on this.

thanks
Shveta



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: New function normal_rand_array function to contrib/tablefunc.
Next
From: shveta malik
Date:
Subject: Re: Conflict detection and logging in logical replication