On Thu, Sep 3, 2026 at 4:11 PM Robert Haas <[email protected]> wrote: > Here it is again, with a second patch to add CHECK_FOR_INTERRUPTS() > and check_stack_depth() calls.
v3, with more patches.
0001 fixes finding #1 from the original report, namely, that empty
advice string causes a pg_stash_advice.tsv reload failure.
0002 fixes finding #2 from the original report, the lack of
CHECK_FOR_INTERRUPTS() calls inside loops, especially the JOIN_ORDER()
loop. It also adds check_stack_depth() calls in to various recursive
functions.
0003 fixes finding #4 from the original report by documenting the
intended interaction with GEQO and removing the XXX comment from the
README.
0004 fixes a GEQO-related oversight in the original disabled_nodes
patch that could result in the intended behavior from 0003 not holding
in all cases. In principle, this should be back-patched to v18, but
since the non-hacky way of fixing it requires an ABI change and
nobody's complained, I am inclined, at least for now, to fix only v19
and master.
0005 fixes finding #7 form the original report, namely that something
like JOIN_ORDER(f {d1 d2}) tends to get marked /* matched, failed */
rather than /* matched */ even when everything is working. I suppose I
sort of knew about this and thought it wasn't that big of a deal, but
I now think that may have been laziness on my part rather than a
principled position.
There are still some more things to fix here, so I'll keep working on
this next week.
--
Robert Haas
EDB: http://www.enterprisedb.com
v3-0005-pg_plan_advice-Fix-advice-feedback-for-unordered-.patch
Description: Binary data
v3-0002-pg_plan_advice-Add-CHECK_FOR_INTERRUPTS-and-check.patch
Description: Binary data
v3-0003-pg_plan_advice-Document-interaction-with-GEQO.patch
Description: Binary data
v3-0004-Change-GEQO-fitness-comparisons-to-consider-disab.patch
Description: Binary data
v3-0001-pg_stash_advice-Fix-failure-to-reload-empty-advic.patch
Description: Binary data
