| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Lukas Fittl <lukas(at)fittl(dot)com> |
| Cc: | Sami Imseih <samimseih(at)gmail(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: | 2025-12-30 04:31:30 |
| Message-ID: | aVNVouHQGFqFz6qu@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Dec 29, 2025 at 06:34:18PM -0800, Lukas Fittl wrote:
> I noticed pg_hint_plan checks the JumbleState argument to determine whether
> or not to run an early check of the hint logic. I'm a little
> confused by this (and if this is about query IDs being available,
> couldn't it just check the Query having a non-zero queryID?), but
> FWIW: [3]
See also the code before 32ced2e13e75. We wanted a JumbleState in
this case to be able to generate a normalized query for the hint
table. Since this commit we only rely on the query ID in the hint
table, so it would not matter for pg_hint_plan if the JumbleState is
removed from this portions of the hooks.
Saying that, yes I think that you are right, we should be able to
remove this dependency on JumbleState in
pg_hint_plan_post_parse_analyze() and rely on the query ID. I'm
writing down a note about cleaning that on the HEAD branch of the
module..
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-30 04:32:55 | Re: Fix duplicated word in lsyscache.c comment |
| Previous Message | Chao Li | 2025-12-30 03:54:43 | Re: Assertion failure in SnapBuildInitialSnapshot() |