Re: compute_query_id and pg_stat_statements

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Christoph Berg <myon(at)debian(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: compute_query_id and pg_stat_statements
Date: 2021-05-14 16:23:15
Message-ID: CAFj8pRDx1AhgMi7fBzdcThd8vYiFGstT3-oicP5Tb7W8b6NrSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pá 14. 5. 2021 v 18:21 odesílatel Bruce Momjian <bruce(at)momjian(dot)us> napsal:

> On Fri, May 14, 2021 at 12:04:05PM -0400, Andrew Dunstan wrote:
> > > On May 14, 2021, at 8:35 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > >
> > > On Thu, May 13, 2021 at 09:41:42PM -0400, Bruce Momjian wrote:
> > > I think keeping the output as 'auto', and documenting that this query
> > > must be run to determine if the query id is being computed:
> > >
> > > SELECT query_id
> > > FROM pg_stat_activity
> > > WHERE pid = pg_backend_pid();
> > >
> > > is the right approach.
> >
> > I’d rather we added a specific function. This is not really obvious.
>
> Well, we can document this query, add a function, or add a read-only
> GUC. I am not sure how we decide which one to use.
>

I though and I prefer read only GUC

It is easy to write "show all"

Pavel

> --
> Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
> EDB https://enterprisedb.com
>
> If only the physical world exists, free will is an illusion.
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-05-14 16:44:18 Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Previous Message Bruce Momjian 2021-05-14 16:21:23 Re: compute_query_id and pg_stat_statements