From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: 007_pre_auth.pl fails if injection_points_wakeup hits unintended process
Date: Mon, 2 Nov 2026 16:08:13 +0900
Message-ID: <aug23e2491A3BCln@paquier.xyz> (raw)
In-Reply-To: <c984ed89-cac1-47a9-91fa-4d3287722203@gmail.com>
References: <c984ed89-cac1-47a9-91fa-4d3287722203@gmail.com>
On Sun, Nov 01, 2026 at 03:00:00PM +0200, Alexander Lakhin wrote:
> That is, the wakeup can hit autovacuum worker or logical replication
> launcher, not the intended client backend. This test failure can be easily
> reproduced with:
> @@ -753,2 +753,3 @@ InitPostgres(const char *in_dbname, Oid dboid,
> pgstat_bestart_initial();
> +if (AmRegularBackendProcess()) pg_usleep(1000000);
> INJECTION_POINT("init-pre-auth", NULL);
>
> and
> echo "autovacuum_naptime = 1s" >/tmp/temp.config
> TEMP_CONFIG=/tmp/temp.config PROVE_TESTS="t/007*" make -s check -C src/test/authentication
>
> Reproduced starting from e2080261c.
Thanks for the report. I am planning to tackle this one with the
following tweak to the test's conf:
autovacuum = off
max_logical_replication_workers = 0
Does that work for you?
--
Michael
Attachments:preauth-test.patch (text/plain, 638B) downloaddiff --git a/src/test/authentication/t/007_pre_auth.pl b/src/test/authentication/t/007_pre_auth.plindex 04063f4721d9..9c2e3341d768 100644--- a/src/test/authentication/t/007_pre_auth.pl+++ b/src/test/authentication/t/007_pre_auth.pl@@ -18,9 +18,14 @@ if ($ENV{enable_injection_points} ne 'yes')
my $node = PostgreSQL::Test::Cluster->new('primary');
$node->init;
++# Disable autovacuum and logical replication workers; these could reach+# the injection point wait.
$node->append_conf(
'postgresql.conf', q[
log_connections = 'receipt,authentication'
+autovacuum = off+max_logical_replication_workers = 0
]);
$node->start;
signature.asc (application/pgp-signature, 832B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, exclusion@gmail.com
Subject: Re: 007_pre_auth.pl fails if injection_points_wakeup hits unintended process
In-Reply-To: <aug23e2491A3BCln@paquier.xyz>
References: <c984ed89-cac1-47a9-91fa-4d3287722203@gmail.com> <aug23e2491A3BCln@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox