Re: [PATCH] Optionally record Plan IDs to track plan changes for a query
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Lukas Fittl <lukas@fittl.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Marko M <marko@pganalyze.com>
Date: 2025-02-04T23:14:48Z
Lists: pgsql-hackers
>> Separately I've been thinking how we could best have a discussion/review on >> whether the jumbling of specific plan struct fields is correct. I was >> thinking maybe a quick wiki page could be helpful, noting why to jumble/not >> jumble certain fields? > Makes sense. This is a complicated topic. +1 for the Wiki page I started looking at the set of patches and started with v3-0001. For that one, I think we need to refactor a bit more for maintainability/readability. queryjumblefuncs.c now has dual purposes which is the generic node jumbling code and now it also has the specific query jumbling code. That seems wrong from a readability/maintainability perspective. Here are my high-level thoughts on this: 1. rename queryjumblefuncs.c to jumblefuncs.c 2. move the query jumbling related code to parser/analyze.c, since query jumbling occurs there during parsing. 3. Rewrite the comments in the new jumblefuncs.c to make it clear the intention of this infrastructure; that it is used to jumble nodes for query or plan trees. I can work on this if you agree. Regards, Sami
Commits
-
doc: Update header file mention for CompareType
- b39013b7b1b1 19 (unreleased) cited
-
Allow plugins to set a 64-bit plan identifier in PlannedStmt
- 2a0cd38da5cc 18.0 landed
-
Fix indentation of comment in plannodes.h
- c9238ad85325 18.0 landed
-
Reformat node comments in plannodes.h
- 3d17d7d7fb7a 18.0 landed
-
injection_points: Add routine able to drop all stats
- a632cd354d35 18.0 landed
-
Add pgstat_drop_matching_entries() to pgstats
- ce5c620fb625 18.0 landed
-
Move pg_stat_statements query jumbling to core.
- 5fd9dfa5f50e 14.0 cited