| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Sami Imseih <samimseih(at)gmail(dot)com> |
| Cc: | Lukas Fittl <lukas(at)fittl(dot)com>, zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Julien Rouhaud <rjuju123(at)gmail(dot)com> |
| Subject: | Re: Refactor query normalization into core query jumbling |
| Date: | 2026-03-28 01:42:09 |
| Message-ID: | 8437F4D0-9DFB-4045-9318-CC3C5BA2E267@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Mar 28, 2026, at 2:09, Sami Imseih <samimseih(at)gmail(dot)com> wrote:
> I agree that ComputeConstantLengths should be in core. This one is
> not a gray area IMO. The query jumble already records constant locations,
> but leaves the lengths unset. ComputeConstantLengths is just the
> completion of that work. There could be no other interpretation,
> unlike generate_normalized_query, of what the lengths should be.
This is an interesting remark. One problem with any patches presented yet is that we don’t attach the lengths as part of the in-core query jumbling procedure: we plug the lengths later using the same structure as the query jumbling. It seems to me that this is half-baked overall. I think that we don’t want to pay the extra length computation in the core query jumbling at the end, then why does it make sense to include the lengths in the JumbleState structure at all? Shouldn’t we use a different structure filled inside PGSS for this purpose rather than reuse the same thing for PGSS and the in-core part (don’t have the code in front of me now).
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | SATYANARAYANA NARLAPURAM | 2026-03-28 04:14:01 | Re: Add pg_stat_autovacuum_priority |
| Previous Message | jian he | 2026-03-28 00:37:07 | Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions |