From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Expand assertion check for query ID reporting in executor
Date: Mon, 30 Sep 2024 23:57:05 +0000
Message-ID: <E1svQGG-001dxP-LV@gemulon.postgresql.org> (raw)
Expand assertion check for query ID reporting in executor
As formulated, the assertion added in the executor by 24f520594809 to
check that a query ID is set had two problems:
- track_activities may be disabled while compute_query_id is enabled,
causing the query ID to not be reported to pg_stat_activity.
- debug_query_string may not be set in some context. The only path
where this would matter is visibly autovacuum, should parallel workers
be enabled there at some point. This is not the case currently.
There was no test showing the interactions between the query ID and
track_activities, so let's add one based on a scan of pg_stat_activity.
This assertion is still an experimentation at this stage, but let's see
if this shows more paths where query IDs are not properly set while they
should.
Discussion: https://postgr.es/m/Zvn5616oYXmpXyHI@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5deb56387e3a1d08e1e62bed031258db267a0ab5
Modified Files
--------------
src/backend/executor/execMain.c | 18 +++++++++++++++---
src/test/regress/expected/guc.out | 21 +++++++++++++++++++++
src/test/regress/sql/guc.sql | 12 ++++++++++++
3 files changed, 48 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: Expand assertion check for query ID reporting in executor
In-Reply-To: <E1svQGG-001dxP-LV@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