pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Christoph Berg <myon@debian.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: compute_query_id and pg_stat_statements
Date: Thu, 13 May 2021 09:57:00 +0800
Message-ID: <20210513015700.fp33q5rfvwl2ahfx@nol> (raw)
In-Reply-To: <20210513011325.GA11075@momjian.us>
References: <20210512081445.axosz3xf7ydrhe7o@nol>
	<CAFj8pRDtehwqY9JgQsRBakpqsd9UfcsKxxF4u3TVpgBzrtib0g@mail.gmail.com>
	<20210512093026.ur43cu3c46eshbew@nol>
	<20210512.183927.600535883807655721.horikyota.ntt@gmail.com>
	<CAFj8pRCfxtRCoT10wyDAGq6cuW3oVfEJ_JUjEGW_jBs=tpPYnA@mail.gmail.com>
	<20210512095149.kqbnhe72uijfwi2r@nol>
	<20210513003618.GA26043@momjian.us>
	<20210513005236.aj7n6b76yjsxythc@nol>
	<20210513011325.GA11075@momjian.us>

On Wed, May 12, 2021 at 09:13:25PM -0400, Bruce Momjian wrote:
> On Thu, May 13, 2021 at 08:52:36AM +0800, Julien Rouhaud wrote:
> > 
> > Well, as implemented you can get the value of compute_query_id, and if it's
> > still "auto" then it's not enabled as calling queryIdWanted() would turn it to
> > on.  I agree that it's not ideal but you have a way to know.  We could document
> > that auto means that it's set to auto and no one asked to automatically enabled
> > it.
> 
> Wow, so the extension changes it?

Yes.  It seemed better to go this way rather than having a secondary read-only
GUC for that.

> How do we record the "source" of that
> change?  Do we have other GUCs that do that?

No, we don't.  But I don't know what exactly you would like to have as a
source?  What if you have for instance pg_stat_statements, pg_stat_kcache,
pg_store_plans and pg_wait_sampling installed?  All those extensions need a
query_id (or at least benefit from it for pg_wait_sampling), is there any value
to give a full list of all the modules that would enable compute_query_id?

I'm assuming that anyone wanting to install any of those extensions (or any
similar one) is fully aware that they aggregate metrics based on at least a
query_id.  If they don't, well they probably never read any documentation since
postgres 9.2 which introduced query normalization, and I doubt that they will
be interested in having access to the information anyway.





view thread (158+ messages)  latest in thread

Message-ID: <20210513015700.fp33q5rfvwl2ahfx@nol>
Permalink:  ../20210513015700.fp33q5rfvwl2ahfx@nol/
Also on:    postgresql.org/message-id/20210513015700.fp33q5rfvwl2ahfx@nol

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: rjuju123@gmail.com, bruce@momjian.us, pavel.stehule@gmail.com, horikyota.ntt@gmail.com, magnus@hagander.net, masao.fujii@oss.nttdata.com, michael@paquier.xyz, andres@anarazel.de, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, sfrost@snowman.net, myon@debian.org, peter.eisentraut@enterprisedb.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: compute_query_id and pg_stat_statements
  In-Reply-To: <20210513015700.fp33q5rfvwl2ahfx@nol>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox