RE: Clock-skew management in logical replication

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>
Cc: 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-25 09:39:49
Message-ID: TYAPR01MB56925E73413AC18CE2B22CA8F5692@TYAPR01MB5692.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear hackers,

> 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
```

## Oracle case

Oracle RAC requires that all participants are well synchronized by NTP.
Formally, it had an automatic synchronization feature called "Cluster Time
Synchronization Service (CTSS)." It is de-supported in Oracle Database 23ai [3].

[1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-ec2-ntp.html
[2]: https://cloud.google.com/compute/docs/instances/configure-ntp
[3]: https://docs.oracle.com/en/database/oracle/oracle-database/23/cwlin/server-configuration-checklist-for-oracle-grid-infrastructure.html

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2024-09-25 10:27:08 Re: meson and check-tests
Previous Message Peter Eisentraut 2024-09-25 08:51:05 Re: Add support to TLS 1.3 cipher suites and curves lists