public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Dmitry Dolgov <[email protected]>
Cc: Kirill Reshke <[email protected]>
Cc: Sergei Kornilov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Sutou Kouhei <[email protected]>
Subject: Re: pg_stat_statements and "IN" conditions
Date: Tue, 11 Feb 2025 19:52:33 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0tbcQoFmMCQh3nNSg5dKsuepa9-uTfYXTMXxdU+Xi9KhA@mail.gmail.com>

On 2025-Feb-11, Sami Imseih wrote:

> I have only looked at 0001, but I am wondering why
> query_id_const_merge is a pg_stat_statements GUC
> rather than a core GUC?

I was wondering the same thing and found the explanation 
here:
https://postgr.es/m/[email protected]

> Other extensions that consume queryIds may also want this
> behavior without needing to enable pg_stat_statements.

I agree.  In fact, pg_stat_activity will behave differently (using
merged query_ids) if this value is turned on, for which you need the
contrib module.  This makes no sense to me.

Besides, the patch cheats in this regard: what Dmitry did was
create a function SetQueryIdConstMerge() which the extension with the
GUC can call to set the value of the variable.  I really don't see that
this is better.  I think we should put the GUC back where it was in v15
of the patch.  (I didn't check what other changes there were
afterwards.)

About the GUC name -- query_id_const_merge -- I think this is too much a
hacker's name.  How about
query_id_merge_values
query_id_merge_value_lists
query_id_squash_constant_lists

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"No es bueno caminar con un hombre muerto"






view thread (5+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pg_stat_statements and "IN" conditions
  In-Reply-To: <[email protected]>

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

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