On 18/01/2024 10:26, Kyotaro Horiguchi wrote:
At Sun, 31 Dec 2023 20:07:41 +0900 (JST), Kyotaro Horiguchi 
<horikyota....@gmail.com> wrote in
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.

Apologize for the inconvenience on my part, but I need to fix this
behavior. To continue this discussion, I'm providing a repro script
here.

Thanks for script, I can repro this with it.

Given that commit 728f86fec6 that introduced this issue was not strictly required, perhaps we should just revert it for v16.

In your patch, there's one more stray reference to ProcessWalRcvInterrupts() in the comment above libpqrcv_PQexec. That makes me wonder, why didn't commit 728f86fec6 go all the way and also replace libpqrcv_PQexec and libpqrcv_PQgetResult with libpqsrv_exec and libpqsrv_get_result?

--
Heikki Linnakangas
Neon (https://neon.tech)



Reply via email to