From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_blocking_pids() for relation extension locks.
Date: Mon, 05 Oct 2026 19:52:47 +0000
Message-ID: <E1xDojv-00000000SIP-31J3@gemulon.postgresql.org> (raw)
Fix pg_blocking_pids() for relation extension locks.
pg_blocking_pids() assumes that members of the same lock group
never block each other, but that hasn't been true for relation
extension locks since v13. This commit teaches the function to
report lock group members as blockers for relation extension locks.
Since parallel workers are reported with their leader's PID, the
result may now include the blocked session's own PID.
Oversight in commit 85f6b49c2c.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Shihao Zhong <zhong950419@gmail.com>
Discussion: https://postgr.es/m/apTpV8h%2BCYHf%2B1PJ%40bdtpg
Backpatch-through: 14
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/af42a7a82fc008a0d1f781138156155291fe73b9
Modified Files
--------------
doc/src/sgml/func.sgml | 21 ++++++++++++++-------
src/backend/utils/adt/lockfuncs.c | 10 ++++++++--
2 files changed, 22 insertions(+), 9 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: nathan@postgresql.org
Subject: Re: pgsql: Fix pg_blocking_pids() for relation extension locks.
In-Reply-To: <E1xDojv-00000000SIP-31J3@gemulon.postgresql.org>
References: <E1xDojv-00000000SIP-31J3@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