Re: query_id, pg_stat_activity, extended query protocol

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, kaido vaikla <kaido(dot)vaikla(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: query_id, pg_stat_activity, extended query protocol
Date: 2024-10-01 02:07:44
Message-ID: ZvtZcMvOeU7QKzo_@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 30, 2024 at 10:07:55AM +0900, Michael Paquier wrote:
> The first point is just some prevention for the future. The second
> case is something we should fix and test. I am attaching a patch that
> addresses both. Note that the test case cannot use a transaction
> block as query IDs are only reported for the top queries, and we can
> do a scan of pg_stat_activity to see if the query ID is set. The
> assertion was getting more complicated, so I have hidden that behind a
> macro in execMain.c. All that should complete this project.

And done this part.

While looking at the interactions between query ID and debug_string,
I've bumped into something that could be a fun project for a
contributor. Will post that in a bit, that may interest some.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuya Watari 2024-10-01 02:35:05 Re: [PoC] Reducing planning time when tables have many partitions
Previous Message Tatsuo Ishii 2024-10-01 01:33:50 Re: Doc: typo in config.sgml