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

From Zhijie Hou (Fujitsu)
Subject RE: Conflict Detection and Resolution
Date
Msg-id OS0PR01MB571681EA763FE9DC28D7581794402@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Conflict Detection and Resolution  (shveta malik <shveta.malik@gmail.com>)
Responses Re: Conflict Detection and Resolution
List pgsql-hackers
On Wednesday, October 9, 2024 2:34 PM shveta malik <shveta.malik@gmail.com> wrote:
> 
> On Wed, Oct 9, 2024 at 8:58 AM shveta malik <shveta.malik@gmail.com>
> wrote:
> >
> > On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond
> <nisha.moond412@gmail.com> wrote:
> > >
> >
> 
> Please find few comments on v14-patch004:
> 
> patch004:
> 1)
> GetConflictResolver currently errors out when the resolver is last_update_wins
> and track_commit_timestamp is disabled. It means every conflict resolution
> with this resolver will keep on erroring out. I am not sure if we should emit
> ERROR here. We do emit ERROR when someone tries to configure
> last_update_wins but track_commit_timestamp is disabled. I think that should
> suffice. The one in GetConflictResolver can be converted to WARNING max.
> 
> What could be the side-effect if we do not emit error here? In such a case, the
> local timestamp will be 0 and remote change will always win.
> Is that right? If so, then if needed, we can emit a warning saying something like:
> 'track_commit_timestamp is disabled and thus remote change is applied
> always.'
> 
> Thoughts?

I think simply reporting a warning and applying remote changes without further
action could lead to data inconsistencies between nodes. Considering the
potential challenges and time required to recover from these inconsistencies, I
prefer to keep reporting errors, in which case users have an opportunity to
resolve the issue by enabling track_commit_timestamp.

Best Regards,
Hou zj



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description
Next
From: Ranier Vilela
Date:
Subject: Re: replace strtok()