pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Julien Rouhaud <rjuju123@gmail.com>
To: 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: Magnus Hagander <magnus@hagander.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Christoph Berg <myon@debian.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: compute_query_id and pg_stat_statements
Date: Tue, 11 May 2021 17:41:53 +0900
Message-ID: <4f0929bf-c690-f2be-a050-a69a47a79651@oss.nttdata.com> (raw)
In-Reply-To: <20210511073539.vw4m46vvbqhiwnz5@nol>
References: <2268611.1619458140@sss.pgh.pa.us>
	<20210426174331.GA19401@alvherre.pgsql>
	<20210426181408.3j6kkzpxnadpwptv@alap3.anarazel.de>
	<2295572.1619461260@sss.pgh.pa.us>
	<20210426183745.4gd2s5qra6mlxfto@alap3.anarazel.de>
	<20210427062504.ofz3rgedbrl5bep2@nol>
	<YJoeXcrwe1EDmqKT@paquier.xyz>
	<20210511073539.vw4m46vvbqhiwnz5@nol>



On 2021/05/11 16:35, Julien Rouhaud wrote:
> Anyway, PFA a patch that implement a [off | on | auto] compute_query_id, and
> provides a new queryIdWanted() function to let third party plugins inform us
> that they want a query id if possible.

Thanks!


> As it was noted somewhere in that thread, that's a hack on top on the GUC
> machinery, so compute_query_id will display "on" rather than "auto" (or "auto
> and enabled" or whatever) since GUC isn't designed to handle that behavior.

Can't we work around this issue by making queryIdWanted() set another flag like query_id_wanted instead of overwriting compute_query_id? If we do this, query id computation is necessary when "compute_query_id == COMPUTE_QUERY_ID_ON || (compute_query_id == COMPUTE_QUERY_ID_AUTO && query_id_wanted)".

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





view thread (158+ messages)  latest in thread

Message-ID: <4f0929bf-c690-f2be-a050-a69a47a79651@oss.nttdata.com>
Permalink:  ../4f0929bf-c690-f2be-a050-a69a47a79651@oss.nttdata.com/
Also on:    postgresql.org/message-id/4f0929bf-c690-f2be-a050-a69a47a79651@oss.nttdata.com

 · 

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: masao.fujii@oss.nttdata.com, rjuju123@gmail.com, michael@paquier.xyz, andres@anarazel.de, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, sfrost@snowman.net, magnus@hagander.net, bruce@momjian.us, myon@debian.org, peter.eisentraut@enterprisedb.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: compute_query_id and pg_stat_statements
  In-Reply-To: <4f0929bf-c690-f2be-a050-a69a47a79651@oss.nttdata.com>

* 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