Network failure may prevent promotion

Поиск
Список
Период
Сортировка
Искать
От
Kyotaro Horiguchi
Тема
Network failure may prevent promotion
Дата
Msg-id
20231231.200741.1078989336605759878.horikyota.ntt@gmail.com
Ответ на
Список
Дерево обсуждения
libpqsrv_connect_params should call ProcessWalRcvInterrupts Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Network failure may prevent promotion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Network failure may prevent promotion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Network failure may prevent promotion Heikki Linnakangas <hlinnaka@iki.fi>
Re: Network failure may prevent promotion Fujii Masao <masao.fujii@gmail.com>
Re: Network failure may prevent promotion Michael Paquier <michael@paquier.xyz>
Re: Network failure may prevent promotion Andres Freund <andres@anarazel.de>
Re: Network failure may prevent promotion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Network failure may prevent promotion Heikki Linnakangas <hlinnaka@iki.fi>
Re: Network failure may prevent promotion Fujii Masao <masao.fujii@gmail.com>
Re: Network failure may prevent promotion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Network failure may prevent promotion Heikki Linnakangas <hlinnaka@iki.fi>
Re: Network failure may prevent promotion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Network failure may prevent promotion Robert Haas <robertmhaas@gmail.com>
Re: Network failure may prevent promotion Yura Sokolov <y.sokolov@postgrespro.ru>
Re: Network failure may prevent promotion Heikki Linnakangas <hlinnaka@iki.fi>
Re: Network failure may prevent promotion Fujii Masao <masao.fujii@gmail.com>
Re: Network failure may prevent promotion Fujii Masao <masao.fujii@gmail.com>
Re: Network failure may prevent promotion Peter Smith <smithpb2250@gmail.com>
(Apology for resubmitting due to poor subject of the previous mail)
---
Hello.

We've noticed that when walreceiver is waiting for a connection to
complete, standby does not immediately respond to promotion
requests. In PG14, upon receiving a promotion request, walreceiver
terminates instantly, but in PG16, it waits for connection
timeout. This behavior is attributed to commit 728f86fec65, where a
part of libpqrcv_connect was simply replaced with a call to
libpqsrc_connect_params. This behavior can be verified by simply
dropping packets from the standby to the primary.

By a simple thought, in walreceiver, libpqsrv_connect_internal could
just call ProcessWalRcvInterrupts() instead of CHECK_FOR_INTERRUPTS(),
but this approach is quite ugly. Since ProcessWalRcvInterrupts()
originally calls CHECK_FOR_INTERRUPTS() and there are no standalone
calls to CHECK_FOR_INTERRUPTS() within walreceiver, I think it might
be better to use ProcDiePending instead of ShutdownRequestPending.  I
added a subset function of die() as the SIGTERM handler in walsender
in a crude patch attached.

What do you think about the issue, and the approach?

If there are no issues or objections with this method, I will continue
to refine this patch. For now, I plan to register it for the upcoming
commitfest.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления
От: Kyotaro Horiguchi
Дата:
От: Ivan Kush
Дата:
FAQ