Re: doc: Mention clock synchronization recommendation for hot_standby_feedback - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: doc: Mention clock synchronization recommendation for hot_standby_feedback
Date
Msg-id CAA4eK1LqShf_kaPMKEi8U6ooTSRCxu_HOfE=hN5RughRQbSe6w@mail.gmail.com
Whole thread Raw
In response to Re: doc: Mention clock synchronization recommendation for hot_standby_feedback  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
On Mon, Mar 3, 2025 at 3:18 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> On 2025/03/03 16:35, Jakub Wartak wrote:
> > Hi Amit,
> >
> > On Mon, Mar 3, 2025 at 6:26 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > [..]
> >
> > OK, sure.
> >
> >> How about something like: "Note that if the clock on standby is moved
> >> ahead or backward, the feedback message may not be sent at the
> >> required interval. This can lead to prolonged risk of not removing
> >> dead rows on primary for extended periods as the feedback mechanism is
> >> based on timestamp."
> >
> > Sure thing. I've just added '(..) In the extreme cases this can..' as
> > it is pretty rare to hit it. Patch attached.
>
> When the clock moves forward or backward, couldn't it affect
> not only the standby but also the primary? I’m wondering
> because TimestampDifferenceExceeds() seems to be used
> in several places in addition to hot standby feedback.
>

Right, it could impact other places as well, like background WAL flush
being delayed. So, what should we do about this? Shall we leave this
as is, make a general statement, find all cases and make a note about
them in docs, do it for the important ones where the impact is more,
or something else?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add assertion for failed alloc to palloc0() and palloc_extended()
Next
From: Thomas Munro
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER