Re: Display individual query in pg_stat_activity - Mailing list pgsql-hackers

From Dave Page
Subject Re: Display individual query in pg_stat_activity
Date
Msg-id CA+OCxozrKrt=39d_kcnpNmOs=wG+4NFTfTa3jqHNuv=DJj9E+g@mail.gmail.com
Whole thread Raw
In response to Display individual query in pg_stat_activity  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
Responses Re: Display individual query in pg_stat_activity  (Jeremy Schneider <schnjere@amazon.com>)
Re: Display individual query in pg_stat_activity  (Jim Nasby <nasbyj@amazon.com>)
Re: Display individual query in pg_stat_activity  ("Drouvot, Bertrand" <bdrouvot@amazon.com>)
List pgsql-hackers
Hi

On Mon, Jul 27, 2020 at 3:40 PM Drouvot, Bertrand <bdrouvot@amazon.com> wrote:
Hi hackers,

I've attached a patch to display individual query in the pg_stat_activity query field when multiple SQL statements are currently displayed.

Motivation:

When multiple statements are displayed then we don’t know which one is currently running.

I'm not sure I'd want that to happen, as it could make it much harder to track the activity back to a query in the application layer or server logs. 

Perhaps a separate field could be added for the current statement, or a value to indicate what the current statement number in the query is?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: display offset along with block number in vacuum errors
Next
From: Anastasia Lubennikova
Date:
Subject: Re: [BUG] Error in BRIN summarization