public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew Dunstan <[email protected]>
To: Andres Freund <[email protected]>
To: [email protected]
Subject: Re: pgsql: tests: Fix race condition in postmaster/002_connection_limits
Date: Mon, 10 Mar 2025 18:46:12 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On 2025-03-07 Fr 1:22 PM, Andres Freund wrote:
> tests: Fix race condition in postmaster/002_connection_limits
>
> The test occasionally failed due to unexpected connection limit errors being
> encountered after having waited for FATAL errors on another connection. These
> spurious failures were caused by the the backend reporting FATAL errors to the
> client before detaching from the PGPROC entry. Adding a sleep(1) before
> proc_exit() makes it easy to reproduce that problem.
>
> To fix the issue, add a helper function that waits for postmaster to notice
> the process having exited. For now this is implemented by waiting for the
> DEBUG2 message that postmaster logs in that case. That's not the prettiest
> fix, but simple. If we notice this problem elsewhere, it might be worthwhile
> to make this more general, e.g. by adding an injection point.
>
New test breaks when log_error_verbosity=verbose. It's adding an SQL
ERRCODE to the DEBUG string.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
view thread (3+ 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], [email protected]
Subject: Re: pgsql: tests: Fix race condition in postmaster/002_connection_limits
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