Re: query_id: jumble names of temp tables for better pg_stat_statement UX

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, ma lz <ma100(at)hotmail(dot)com>
Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Date: 2025-03-25 03:30:59
Message-ID: CAA5RZ0vKpKEWcJn_UZkQVK=j1EUsXfASo06uWSqizzrwKMx8mQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> Sami Imseih <samimseih(at)gmail(dot)com> writes:
> > I agree that some may want stats to merge for the same tables,
> > and others may not. I will suggest this with some hesitation, but why not
> > make this behavior configurable via a GUC?
> > We recently introduced query_id_squash_values for controlling
> > the merge of an IN list, maybe this is another queryId behavior we should
> > provide a configuration for?
>
> I don't like that GUC and I would not like this one either. We
> learned years ago that GUCs that change query semantics are a bad
> idea, but apparently now we have hackers who need to relearn that
> lesson the hard way. (Admittedly, this isn't quite *query* semantics,
> which perhaps lessens the blast radius. But I think we're still going
> to regret query_id_squash_values.)

query_id_squash_values has a much weaker argument to exist than a
guc to control the use of alias vs OID. Why would anyone not want
to squash the IN list? maybe we should revisit this decision in that thread.

With that said, if everyone is OK with the behavior change of pg_s_s
with this patch, I will concede. FWIW, I do think this for most cases, the
proposed behavior is desirable. I just worry about the users who rely on the
OID being jumbled behavior, and have no way to revery.

--
Sami Imseih
Amazon Web Services (AWS)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2025-03-25 03:47:19 Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Previous Message Tom Lane 2025-03-25 02:56:30 Re: query_id: jumble names of temp tables for better pg_stat_statement UX

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-03-25 03:32:56 Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment
Previous Message vignesh C 2025-03-25 03:21:08 Re: Conflict detection for multiple_unique_conflicts in logical replication