Re: query_id: jumble names of temp tables for better pg_stat_statement UX - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Date
Msg-id Z9-sUvq8pE5uinEu@paquier.xyz
Whole thread Raw
In response to Re: query_id: jumble names of temp tables for better pg_stat_statement UX  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: query_id: jumble names of temp tables for better pg_stat_statement UX
Re: query_id: jumble names of temp tables for better pg_stat_statement UX
List 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

pgsql-hackers by date:

Previous
From: Jeremy Schneider
Date:
Subject: Re: Update Unicode data to Unicode 16.0.0
Next
From: Andrei Lepikhov
Date:
Subject: Re: Proposal - Allow extensions to set a Plan Identifier