On Fri, Jan 16, 2026 at 1:14 PM Jacob Champion <[email protected]> wrote: > Nice! With v10, the next crash comes from pgpa_walker_would_advise() > (from a code branch that has its own copy of the "cannot determine RTI > for advice target" error, so I assume it's a similar issue?).
Actually, GATHER(((x))) should be rejected as invalid syntax. I
believe this is the correct fix:
-generic_sublist: '(' generic_target_list ')'
+generic_sublist: '(' simple_target_list ')'
If you say GATHER((a b c)), that means "put a Gather node on top of
the join between a, b, and c". If you say GATHER(a b c), that means
"put a Gather node on top of each of a, b, and c individually" i.e.
create a plan with three completely separate Gather nodes. GATHER(((a
b c))) is meaningless. The only plan advice type where we need
arbitrarily deep nesting is JOIN_ORDER(), because there we use
sublists to denote bushy or right-deep joins. Otherwise, we should be
limited to no sublists at all for things like SEQ_SCAN and NO_GATHER,
and to a single level for most other advice tags.
Fixup patch attached. Thanks VERY much for the continued testing.
--
Robert Haas
EDB: http://www.enterprisedb.com
too-much-nesting.patch.nocfbot
Description: Binary data
