Re: Suppressing useless wakeups in walreceiver

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Suppressing useless wakeups in walreceiver
Дата
Msg-id 20221013174506.GA1550162@nathanxps13
обсуждение исходный текст
Ответ на Re: Suppressing useless wakeups in walreceiver  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Thu, Oct 13, 2022 at 03:35:14PM +0530, Bharath Rupireddy wrote:
> I think the hot standby feedback message gets sent too frequently
> without honouring the wal_receiver_status_interval because the 'now'
> is actually not the current time with your patch but 'now +
> XLogWalRcvSendReply()'s time'. However, it's possible that I may be
> wrong here.

Is your concern that the next wakeup time will be miscalculated because of
a stale value in 'now'?  I think that's existing behavior, as we save the
current time before sending the message in XLogWalRcvSendReply and
XLogWalRcvSendHSFeedback.  The only way to completely avoid this would be
to call GetCurrentTimestamp() after the message has been sent and to use
that value to calculate when the next message should be sent.  However, I
am skeptical there's really any practical impact.  Is it really a problem
if a message that should be sent every 30 seconds is sent at an interval of
29.9 seconds sometimes?  I think it could go the other way, too.  If 'now'
is stale, we might decide not to send a feedback message until the next
loop iteration, so the interval might be 30.1 seconds.  I don't think it's
realistic to expect complete accuracy here.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: Support tls-exporter as channel binding for TLSv1.3
Следующее
От: Zhihong Yu
Дата:
Сообщение: remove redundant memset() call