public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Robert Pang <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: [PATCH] Fix premature timeout in pg_promote() caused by signal interruptions
Date: Wed, 25 Mar 2026 11:28:17 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJhEC07OK8J7tLUbyiccnuOXRE7UKxBNqD2-pLfeFXa=tBoWtw@mail.gmail.com>
References: <CAJhEC07OK8J7tLUbyiccnuOXRE7UKxBNqD2-pLfeFXa=tBoWtw@mail.gmail.com>
On Wed, Mar 11, 2026 at 09:44:07AM -0700, Robert Pang wrote:
> The current implementation of pg_promote() calculates a fixed number
> of loop iterations based on the timeout value, assuming each loop
> waits exactly 100 ms for the backend latch. However, if the backend
> receives an unrelated signal (e.g., from
> client_connection_check_interval), it wakes up early. These repeated,
> unrelated wakeups cause the loop counter to deplete much faster than
> intended, leading to a premature timeout.
It is true that we can do better here, and your proposal about having
a more precise timeout calculation looks like a sensible improvement
for this case.
No objections regarding your patch. I would like to apply it on HEAD,
if there are no objections.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] Fix premature timeout in pg_promote() caused by signal interruptions
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox