From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: worker_spi: Fix race condition in newly-added TAP tests
Date: Sat, 29 Jul 2023 02:35:59 +0000
Message-ID: <E1qPZoE-001oIo-P6@gemulon.postgresql.org> (raw)
worker_spi: Fix race condition in newly-added TAP tests
The second portion of the tests had a race condition where it would be
possible for the startup of the dynamic workers to fail, in the event
where the static workers started before them with the library loading in
shared_preload_libraries did not finish to create their respective
schemas. The conflict is caused by the fact that the dynamic and static
workers used the same IDs, overlapping each other, so, for now, switch
the dynamic workers to use different IDs, leading to different schemas
created.
Reported-by: Andres Freund
Discussion: https://postgr.es/m/20230728022332.egqzobhskmlf6ntr@awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b68e356a680ee1155b0dc612a89655e98320121a
Modified Files
--------------
src/test/modules/worker_spi/t/001_worker_spi.pl | 8 +++++---
1 file changed, 5 insertions(+), 3 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 race condition in newly-added TAP tests
In-Reply-To: <E1qPZoE-001oIo-P6@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