Re: Logical replication keepalive flood

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Logical replication keepalive flood
Дата
Msg-id 76b8b527-34f5-5061-e921-352bd5a2c298@gmail.com
обсуждение исходный текст
Ответ на Re: Logical replication keepalive flood  (Abbas Butt <abbas.butt@enterprisedb.com>)
Ответы Re: Logical replication keepalive flood  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi.

On 2021/06/08 21:21, Abbas Butt wrote:
> Hi Kyotaro,
> I have tried to test your patches. Unfortunately even after applying the
> patches
> the WAL Sender is still sending too frequent keepalive messages.

Sorry for the bogus patch.  I must have seen something impossible.

The keep-alive packet is immediately flushed explicitly, so Amit is 
right that no additional

pq_flush_if_writable() is not needed.

> In my opinion the fix is to make sure that wal_sender_timeout/2 has passed
> before sending
> the keepalive message in the code fragment I had shared earlier.
> In  other words we should replace the call to
> WalSndKeepalive(false);
> with
> WalSndKeepaliveIfNecessary(false);
>
> Do you agree with the suggested fix?

I'm afraid not. The same is done just after unconditionally.

The issue - if actually it is - we send a keep-alive packet before a 
quite short sleep.

We really want to send it if the sleep gets long but we cannot predict 
that before entering a sleep.

Let me think a little more on this..

regards.





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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Adjust pg_regress output for new long test names
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic