pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix failure of setrefs.c to process child_append_relid_sets 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix failure of setrefs.c to process child_append_relid_sets @ 2026-10-08 16:24 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2026-10-08 16:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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-PioXG1nKkOQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0f7dfd7936b9e99f9aeca00f52ab1692898ffff4 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(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix failure of setrefs.c to process child_append_relid_sets @ 2026-10-08 16:24 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2026-10-08 16:24 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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-PioXG1nKkOQ@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(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-10-08 16:24 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-10-08 16:24 pgsql: Fix failure of setrefs.c to process child_append_relid_sets Robert Haas <rhaas@postgresql.org> 2026-10-08 16:24 pgsql: Fix failure of setrefs.c to process child_append_relid_sets Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox