pg_plan_advice: Add CHECK_FOR_INTERRUPTS() and check_stack_depth() Without CHECK_FOR_INTERRUPTS(), backends might not respond to query cancellations in a timely fashion, especially for JOIN_ORDER() specifications, where matching against each join can take O(n^2) time in the length of the join order list in degenerate cases.
Recursive functions should check_stack_depth(). Reported-by: Noah Misch <[email protected]> Discussion: https://postgr.es/m/ca+tgmoymxy-jip5qdhqneiyfebzqsaro6o2d9e8sznzqi1b...@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ddee5d03077c05925e83533e50ebe805c934d2cf Modified Files -------------- contrib/pg_plan_advice/pgpa_ast.c | 14 ++++++++++++++ contrib/pg_plan_advice/pgpa_planner.c | 7 +++++++ contrib/pg_plan_advice/pgpa_trove.c | 3 +++ 3 files changed, 24 insertions(+)
