Re: JumbleQuery ma treat different GROUP BY expr as the same

From: Keisuke Kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: JumbleQuery ma treat different GROUP BY expr as the same
Date: 2026-03-12 07:47:21
Message-ID: CANDwggK=c+hvCwShGL_METRRKfTGqL58w05xRdk8Dn_awv08uA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

In previous versions, changing the column order in the SELECT clause
also resulted in a different query_id.The test results are in the
attached queryidtest.txt file.

If TargetEntry.resjunk is not marked as query_jumble_ignore, it feels
a bit off that the query_id differs even when the execution plan is
identical, including the output order.

However, it is also true that queries with different column
specifications in the SQL SELECT clause are collected as identical
SQL. To distinguish and collect information on these, modifications
like this patch are necessary.

--
Keisuke Kuroda
NTT DOCOMO SOLUTIONS, Inc.

Attachment Content-Type Size
queryidtest.txt text/plain 2.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-03-12 07:49:22 Re: Add documentation for PG_ABS_SRCDIR, PG_ABS_BUILDDIR, PG_LIBDIR, PG_DLSUFFIX
Previous Message Frédéric Yhuel 2026-03-12 07:47:02 Re: n_dead_tup could be way off just after a vacuum