From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-23 06:38:10 |
Message-ID: | Z9-sUvq8pE5uinEu@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Sat, Mar 22, 2025 at 09:04:19PM -0400, Tom Lane wrote:
> Right. I'm arguing that that's good. The proposed patch already
> obscures the difference between similar table names in different
> (temp) schemas, and I'm suggesting that taking that a bit further
> would be fine.
>
> Note that if the tables we're considering don't have identical
> rowtypes, the queries would likely jumble differently anyway
> due to differences in Vars' varattno and vartype.
Not for the types AFAIK, the varattnos count in, but perhaps for the
same argument as previously it's just kind of OK? Please see the
tests in the attached about that.
I've spent a few hours looking at the diffs of a pgss dump before and
after the fact. The reduction in the number of entries seem to come
mainly from tests where we do a successive creates and drops of the
same table name. There are quite a few of them for updatable views,
but it's not the only one. A good chunk comes from tables with
simpler and rather generic names.
So your idea to use the relation name in eref while skipping the
column list looks kind of promising. Per se the attached. Thoughts?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Add-support-for-custom_query_jumble-at-field-leve.patch | text/x-diff | 4.0 KB |
v4-0002-Add-custom-query-jumble-function-for-RangeTblEntr.patch | text/x-diff | 10.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2025-03-23 13:35:58 | Re: Querying one partition in a function takes locks on all partitions |
Previous Message | Tom Lane | 2025-03-23 03:01:41 | Re: Determine server version from psql script |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrei Lepikhov | 2025-03-23 07:12:45 | Re: Proposal - Allow extensions to set a Plan Identifier |
Previous Message | Jeremy Schneider | 2025-03-23 04:00:31 | Re: Update Unicode data to Unicode 16.0.0 |