Thread: Re: Clock-skew management in logical replication
Nisha Moond <nisha.moond412@gmail.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
On Fri, Sep 20, 2024 at 7:51 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Nisha Moond <nisha.moond412@gmail.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
On Mon, Sep 23, 2024 at 4:00 PM Nisha Moond <nisha.moond412@gmail.com> wrote: > > On Fri, Sep 20, 2024 at 7:51 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > > > Nisha Moond <nisha.moond412@gmail.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. > Windows platforms provide built-in time synchronization services. As a client, they allow users to sync system time using internet or public NTP servers. This can be easily configured by selecting a public NTP server directly in the Date and Time settings. More details can be found at [1]. Additionally, Windows servers can be configured as NTP servers for localized time synchronization within a network, allowing other nodes to sync with them. Further instructions on configuring an NTP server on Windows can be found at [2]. [1] https://learn.microsoft.com/en-us/windows-server/networking/windows-time-service/how-the-windows-time-service-works [2] https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/configure-authoritative-time-server Thanks, Nisha