Re: Clock-skew management in logical replication

From: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Shveta Malik <shveta(dot)malik(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, tomas(at)vondra(dot)me
Subject: Re: Clock-skew management in logical replication
Date: 2024-09-23 10:30:00
Message-ID: CABdArM6pyddeJrRx-0mCJK+F3Q2LcJ6sbGopDJi2DELNCxWdJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 20, 2024 at 7:51 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> writes:
> > While considering the implementation of timestamp-based conflict
> > resolution (last_update_wins) in logical replication (see [1]), there
> > was a feedback at [2] and the discussion on whether or not to manage
> > clock-skew at database level.
>
> FWIW, I cannot see why we would do anything beyond suggesting that
> people run NTP. That's standard anyway on the vast majority of
> machines these days. Why would we add complexity that we have
> to maintain (and document) in order to cater to somebody not doing
> that?
>
> regards, tom lane

Thank you for your response.

I agree with suggesting users to run NTP and we can recommend it in
the docs rather than introducing additional complexities.

In my research on setting up NTP servers on Linux, I found that
Chrony[1] is a lightweight and efficient solution for time
synchronization across nodes. Another reliable option is the classic
NTP daemon (ntpd)[2], which is also easy to configure and maintain.
Both Chrony and ntpd can be used to configure a local machine as an
NTP server for localized time synchronization, or as clients syncing
from public NTP servers such as 'ntp.ubuntu.com' (default ntp server
pool for Ubuntu systems) or 'time.google.com'(Google Public NTP).
For example, on Ubuntu, Chrony is straightforward to install and
configure[3]. Comprehensive NTP(ntpd) configuration guides are
available for various Linux distributions, such as Ubuntu[4] and
RedHat-Linux[5].

Further, I’m exploring options for implementing NTP on Windows systems.

[1] https://chrony-project.org/index.html
[2] https://www.ntp.org/documentation/4.2.8-series/
[3] https://documentation.ubuntu.com/server/how-to/networking/serve-ntp-with-chrony/
[4] https://askubuntu.com/questions/14558/how-do-i-setup-a-local-ntp-server
[5] https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_ntpd#s1-Understanding_the_ntpd_Configuration_File

Thanks,
Nisha

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-09-23 10:49:34 Re: Allow logical failover slots to wait on synchronous replication
Previous Message Tomas Vondra 2024-09-23 10:26:40 Re: scalability bottlenecks with (many) partitions (and more)