Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tw0Ws-009rWT-8u for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Mar 2025 15:12:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tw0Wq-00EvKJ-Uu for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Mar 2025 15:12:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tw0Wq-00EvKB-Kl for pgsql-hackers@lists.postgresql.org; Sat, 22 Mar 2025 15:12:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tw0Wn-000WHv-1E for pgsql-hackers@lists.postgresql.org; Sat, 22 Mar 2025 15:12:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 52MFCdJD1831839; Sat, 22 Mar 2025 11:12:40 -0400 From: Tom Lane To: Michael Paquier cc: Christoph Berg , PostgreSQL Hackers , ma lz Subject: Re: query_id: jumble names of temp tables for better pg_stat_statement UX In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Sat, 22 Mar 2025 19:32:47 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1831837.1742656359.1@sss.pgh.pa.us> Date: Sat, 22 Mar 2025 11:12:39 -0400 Message-ID: <1831838.1742656359@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Sat, Mar 22, 2025 at 10:43:00AM +0100, Christoph Berg wrote: >> Are we at the point where the patch is already Ready for Committer? > I'll think a bit more about how to document all that. Anyway, yes, > I'm OK with the per-field custom_query_jumble, so let's move on with > that, so I will do something about that. I'm not terribly happy with the entire proposal. (1) I know it was asserted upthread that there was no performance impact, but I find that hard to believe. (2) This patch inserts catalog lookups into query ID computation, which AFAIK there never were before. This means you can't compute a query ID outside a transaction or in an already-failed transaction. Surely that's going to bite us eventually. (3) I think having query jumbling work differently for temp tables than other tables is a fundamentally bad idea. So my feeling is: if we think this is the behavior we want, let's do it across the board. I suggest that we simply drop the relid from the jumble and use the table alias (that is, eref->aliasname) instead. ISTM this fits well with the general trend in pg_stat_statements to merge statements together more aggressively than the original concept envisioned. regards, tom lane