Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activityview? - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activityview?
Date
Msg-id CAOBaU_YsiPHJ-mm26omMY7hgBBXfx9Ld0xw-DWrdvpbBKpbqQg@mail.gmail.com
Whole thread Raw
In response to Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activityview?  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: Feature improvement: can we add queryId forpg_catalog.pg_stat_activity view?
Re: Feature improvement: can we add queryId forpg_catalog.pg_stat_activity view?
Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activityview?
List pgsql-hackers
On Mon, Mar 18, 2019 at 7:33 PM Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> On Mon, Mar 18, 2019 at 6:23 PM Yun Li <liyunjuanyong@gmail.com> wrote:
> >
> > Let's take one step back. Since queryId is stored in core as Julien pointed out, can we just add that global to the
pg_stat_get_activityand ultimately exposed in pg_stat_activity view? Then no matter whether PGSS  is on or off, or
howeverthe customer extensions are updating that filed, we expose that field in that view then enable user to leverage
thatid to join with pgss or their extension. Will this sounds a good idea? 
>
> I'd greatly welcome expose queryid exposure in pg_stat_activity, and
> also in log_line_prefix.  I'm afraid that it's too late for pg12
> inclusion, but I'll be happy to provide a patch for that for pg13.

Here's a prototype patch for queryid exposure in pg_stat_activity and
log_line prefix.

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activityview?
Next
From: Thibaut Madelaine
Date:
Subject: Re: Problem with default partition pruning