From: Bruce Momjian <bruce@momjian.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fixes for query_id feature
Date: Thu, 08 Apr 2021 15:16:14 +0000
Message-ID: <E1lUWOE-00015i-ML@gemulon.postgresql.org> (raw)
Fixes for query_id feature
Ignore parallel workers in pg_stat_statements
Oversight in 4f0b0966c8 which exposed queryid in parallel workers.
Counters are aggregated by the main backend process so parallel workers
would report duplicated activity, and could also report activity for the
wrong entry as they are only aware of the top level queryid.
Fix thinko in pg_stat_get_activity when retrieving the queryid.
Remove unnecessary call to pgstat_report_queryid().
Reported-by: Amit Kapila, Andres Freund, Thomas Munro
Discussion: https://postgr.es/m/20210408051735.lfbdzun5zdlax5gd@alap3.anarazel.de p634GTSOqnDW86Owrn6qDAVosC5dJjXjp7BMfc5Gz1Q@mail.gmail.com
Author: Julien Rouhaud
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0f61727b75b93915ca9a9f20c996ed7020996a38
Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 4 +++-
src/backend/executor/execParallel.c | 1 -
src/backend/utils/adt/pgstatfuncs.c | 2 +-
3 files changed, 4 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 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: bruce@momjian.us
Subject: Re: pgsql: Fixes for query_id feature
In-Reply-To: <E1lUWOE-00015i-ML@gemulon.postgresql.org>
References: <E1lUWOE-00015i-ML@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