From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add more debugging information for bgworker termination tests of
Date: Thu, 19 Mar 2026 02:39:51 +0000
Message-ID: <E1w33Ic-000QLB-1K@gemulon.postgresql.org> (raw)
Add more debugging information for bgworker termination tests of worker_spi
widowbird has failed again after af8837a10bc7, with the same symptoms of
a backend still lying around when attempting a database rename with a
bgworker connected to the database being renamed.
We are still not sure yet how the failure can be reached, if this is a
timing issue in the test or an actual bug in the logic used for
interruptible bgworkers. This commit adds more debugging information in
the backend to help with the analysis as a temporary measure.
Another thing I have noticed is that the queries launching the dynamic
bgworkers or checking pg_stat_activity would connect to the database
renamed. These are switched to use 'postgres'. That will hopefully
remove some of the friction of the test, but I doubt that this is the
end of the story.
Discussion: https://postgr.es/m/abtJLEAsf1HZXWdR@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/79a5911fe65be80d4a4cb6ca6f90ae7d2cc6e9bc
Modified Files
--------------
src/backend/postmaster/bgworker.c | 6 ++++++
src/test/modules/worker_spi/t/002_worker_terminate.pl | 10 ++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
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: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add more debugging information for bgworker termination tests of
In-Reply-To: <E1w33Ic-000QLB-1K@gemulon.postgresql.org>
* 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