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

From Jim Nasby
Subject Re: Display individual query in pg_stat_activity
Date
Msg-id b886a78f-a6b2-f1fd-f5be-a6e3b5a89fe7@amazon.com
Whole thread Raw
In response to Re: Display individual query in pg_stat_activity  (Dave Page <dpage@pgadmin.org>)
List pgsql-hackers
On 7/27/20 9:57 AM, Dave Page wrote:
On Mon, Jul 27, 2020 at 3:40 PM Drouvot, Bertrand <bdrouvot@amazon.com> wrote:
<snip>
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?
Perhaps turn query into text[]. That would make it easy to concatenate back together if desired.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Asif Rehman
Date:
Subject: Re: proposal: unescape_text function
Next
From: Robert Haas
Date:
Subject: Re: new heapcheck contrib module