From: Julien Rouhaud <rjuju123@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: magnus@hagander.net
Cc: masao.fujii@oss.nttdata.com
Cc: michael@paquier.xyz
Cc: andres@anarazel.de
Cc: tgl@sss.pgh.pa.us
Cc: alvherre@alvh.no-ip.org
Cc: sfrost@snowman.net
Cc: bruce@momjian.us
Cc: myon@debian.org
Cc: peter.eisentraut@enterprisedb.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: compute_query_id and pg_stat_statements
Date: Thu, 13 May 2021 10:59:24 +0800
Message-ID: <20210513025924.xzfvaycfpme6koad@nol> (raw)
In-Reply-To: <20210513.114934.535938760583149042.horikyota.ntt@gmail.com>
References: <20210513.112629.407758843298621458.horikyota.ntt@gmail.com>
<20210513.113056.577948943557799213.horikyota.ntt@gmail.com>
<20210513023920.raegzbpqpowncbot@nol>
<20210513.114934.535938760583149042.horikyota.ntt@gmail.com>
On Thu, May 13, 2021 at 11:49:34AM +0900, Kyotaro Horiguchi wrote:
> At Thu, 13 May 2021 10:39:20 +0800, Julien Rouhaud <rjuju123@gmail.com> wrote in
> > On Thu, May 13, 2021 at 11:30:56AM +0900, Kyotaro Horiguchi wrote:
> > > At Thu, 13 May 2021 11:26:29 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
> > > > At Thu, 13 May 2021 10:02:45 +0800, Julien Rouhaud <rjuju123@gmail.com> wrote in
> > > > Yes, I know. So I said that "if not yet called". I believe any "real"
> > > > alternative query-id provider is supposed to be hooked "before"
> > > > pg_stat_statements. (It is a kind of magic to control the order of
> > > > plugins, though..) When the alternative provider generated a query_id
> > > > (that is, it has set jstate), pg_stat_statment doesn't call the
> > > > in-core JumbleQuery and uses the givin query_id.
> > >
> > > Forgot to mention, I think that the state "query_id provider is active
> > > but it has not assigned one to this query" can be signaled by
> > > jstate=<non-null> and query_id = 0.
> >
> > I assume that you mean "third-party query_id provider" here, as the core one
> > will always return a non-zero query_id?
>
> Right.
>
> > I guess it could work, but a lot of people are complaining that having
> > compute_query_id = [ off | on | auto ] is too confusing, so I don't see how
> > having "off" means "sometimes off, sometimes on" is going to be any clearer for
> > users.
>
> I don't get it. It read as "people are complaining the tristate is too
> confusing, so I made it tristate"?
No, the consensus was for having a tristate, so I implemented it, and now
people are complaining that it's too confusing.
> For the second point, so I said that the variable controls whether the
> "internal" query-id pvovider turn on. It is more clearer if the name
> were something like "use_internal_query_id_generator".
I don't see how it's really different. If I understand correctly, you're
suggesting that
use_internal_query_id_generator = off
can mean either
- off
- on if pg_stat_statements or similar extension is configured but no custom
query_id provider is configured, and in any case it will always be displayed
as off
with no other new GUC. Is that correct?
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, 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, 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: <20210513025924.xzfvaycfpme6koad@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