From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: worker_spi: Fix another stability issue with BGWORKER_BYPASS_ALL
Date: Tue, 10 Oct 2023 00:07:08 +0000
Message-ID: <E1qq0HD-000rHY-6w@gemulon.postgresql.org> (raw)
worker_spi: Fix another stability issue with BGWORKER_BYPASS_ALLOWCONN
worker_spi_launch() may report that a worker stopped when it fails to
connect on a database that does not allow connections if the worker
exits before the SQL function checks for the current status of the
worker. The test is switched to use Cluster::psql instead of
safe_psql() so as it does not fail hard when this query errors. While
on it, this removes a query that looks at pg_stat_activity to simplify
the test, as a check on the contents of the server logs achieves the
same when the worker cannot connect to the database without
datallowconn.
Per buildfarm members kestrel, mamba and serinus. Bonus thanks to Tom
Lane for providing the logs of the failure from mamba that the buildfarm
was not able to show up. Note that I have reproduced the failure with a
hardcoded stop point.
Discussion: https://postgr.es/m/3365937.1696801735@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f483b209056b4181eb33b97cd6a30910a73c0f87
Modified Files
--------------
src/test/modules/worker_spi/t/001_worker_spi.pl | 26 ++++++++++++-------------
1 file changed, 13 insertions(+), 13 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: worker_spi: Fix another stability issue with BGWORKER_BYPASS_ALL
In-Reply-To: <E1qq0HD-000rHY-6w@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