Re: Clock-skew management in logical replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Joe Conway <mail(at)joeconway(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Shveta Malik <shveta(dot)malik(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "tomas(at)vondra(dot)me" <tomas(at)vondra(dot)me>
Subject: Re: Clock-skew management in logical replication
Date: 2024-09-26 08:56:21
Message-ID: CAA4eK1J=5YiigKXtVm-EpPVz7VjAJPZ=3ZU5sGKmUDdXbiqZjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 25, 2024 at 3:09 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> > Though this provides a way for users to control values required for
> > conflict resolution, I prefer a simple approach at least for the first
> > version which is to document that users should ensure time
> > synchronization via NTP. Even Oracle mentions the same in their docs
>
> I researched some cloud services and found that the time-sync services on the
> cloud are integrated with the NTP or PTP direct connection. This means that there
> are no specific APIs to synchronize the machine clock. Based on that,
> I also agree with the simple approach (just document). I feel the synchronization
> can be regarded as the low-layer task and can rely on the OS.
>
> The below part shows the status of cloud vendors and Oracle.
>
> ## AWS case
>
> AWS provides a "Time Sync Service" [1] that can be used via NTP. The source server
> is at 169.254.169.123; users can modify the configuration file to refer to it shown below.
>
> ```
> server 169.254.169.123 prefer iburst
> ```
>
> Or users can even directly connect to the local and accurate hardware clock.
>
> ## GCP case
>
> GCP compute engines must use an NTP server on the GCP cloud [2], located at
> metadata.google.internal, or other public NTP servers. The configuration will
> look like this:
>
> ```
> server metadata.google.internal iburst
> ```
>

If NTP already provides a way to configure other time-sync services as
shown by you then I don't think we need to do more at this stage
except to document it with the conflict resolution patch. In the
future, we may want to provide an additional column in the table with
a special meaning that can help in conflict resolution.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-09-26 09:01:35 Re: Add support to TLS 1.3 cipher suites and curves lists
Previous Message Jehan-Guillaume de Rorthais 2024-09-26 08:48:35 Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails