From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bugs in GetSafeSnapshotBlockingPids(), introduced in 9600371
Date: Thu, 09 Feb 2023 02:20:22 +0000
Message-ID: <E1pPwXt-000ADc-JR@gemulon.postgresql.org> (raw)
Fix bugs in GetSafeSnapshotBlockingPids(), introduced in 96003717645
While removing the use of SHM_QUEUE from predicate.c, in 96003717645, I made
two mistakes in GetSafeSnapshotBlockingPids():
- Removed the check for output_size
- Previously, when the first loop didn't find a matching proc, sxact would be
NULL. But with naive use of dlist_foreach() it ends up as the value of the
last iteration.
The second issue is the cause of occasional failures in the deadlock-hard and
deadlock-soft isolation tests that we have been observing on CI. The issue was
very hard to reproduce, as it requires the transactions.sql regression test to
run at the same time as the deadlock-{hard,soft} isolation test.
I did not find other similar mistakes in 96003717645.
Discussion: https://postgr.es/m/20230208221145.bwzhancellclrgia@awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/49c2c5fcb1e1e4311f08687f78dd9121330ae637
Modified Files
--------------
src/backend/storage/lmgr/predicate.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 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 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-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Fix bugs in GetSafeSnapshotBlockingPids(), introduced in 9600371
In-Reply-To: <E1pPwXt-000ADc-JR@gemulon.postgresql.org>
References: <E1pPwXt-000ADc-JR@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