Fix failure of setrefs.c to process child_append_relid_sets Commit 7358abcc6076f4b2530d10126ab379f8aea612a5 taught the planner to store information about Append node consolidation in the final plan, but it forgot that child_append_relid_sets needs to be adjusted at setrefs.c time just like every other place where we store RTIs in a plan tree. Fix that.
Although this can cause incorrect plan advice to be emitted in cases involving multi-level partitioning, it seems more appropriate to put the test case for it in pg_overexplain, so this commit does that. Backpatch-through: 19 Discussion: http://postgr.es/m/ca+tgmoyyhc4i-gpzc9-jyhqih6pok+6ltyfinr-pioxg1nk...@mail.gmail.com Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b718dafc70a348dd7876858f5c4c42554a1cf568 Modified Files -------------- contrib/pg_overexplain/expected/pg_overexplain.out | 75 ++++++++++++++++++++++ contrib/pg_overexplain/sql/pg_overexplain.sql | 23 +++++++ src/backend/optimizer/plan/setrefs.c | 23 +++++++ 3 files changed, 121 insertions(+)
