pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix query ID reporting in parallel workers for GIN index builds
Date: Thu, 26 Nov 2026 13:18:55 +0000
Message-ID: <E1xWZNH-00000000OsW-0MhX@gemulon.postgresql.org> (raw)

Fix query ID reporting in parallel workers for GIN index builds

Commit 6fd5071909a made parallel workers for VACUUM, BRIN and btree
index builds report the query ID of the leader, so that they show up
with the correct query_id in pg_stat_activity.  Parallel GIN index
builds were added later by 8492feb98f6, but did not include this,
so GIN build workers have always reported a query ID of 0.

Fix by storing the leader's query ID in the shared build state and
reporting it in the worker, like the other index AMs already do.

No backpatch, for the same reason as 6fd5071909a. This is arguably a
bug, but a minor one and nobody has complained about it.

Author: Lukas Fittl <lukas@fittl.com>
Discussion: https://postgr.es/m/CAP53Pkw3WcVbg61G29AmN=6XkuxGryoWKnhTyC1JmkT08i8qVA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/91993c160de4c6973f79541db9bfeb441c6eef31

Modified Files
--------------
src/backend/access/gin/gininsert.c | 7 +++++++
1 file changed, 7 insertions(+)



Message-ID: <E1xWZNH-00000000OsW-0MhX@gemulon.postgresql.org>
Permalink:  ../E1xWZNH-00000000OsW-0MhX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xWZNH-00000000OsW-0MhX@gemulon.postgresql.org

 · 

reply

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: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Fix query ID reporting in parallel workers for GIN index builds
  In-Reply-To: <E1xWZNH-00000000OsW-0MhX@gemulon.postgresql.org>
  References: <E1xWZNH-00000000OsW-0MhX@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