Fix add_partial_path interaction with disabled_nodes
Robert Haas <rhaas@postgresql.org>
Fix add_partial_path interaction with disabled_nodes Commit e22253467942fdb100087787c3e1e3a8620c54b2 adjusted the logic in add_path() to keep the path list sorted by disabled_nodes and then by total_cost, but failed to make the corresponding adjustment to add_partial_path. As a result, add_partial_path might sort the path list just by total cost, which could lead to later planner misbehavior. In principle, this should be back-patched to v18, but we are typically reluctant to back-patch planner fixes for fear of destabilizing working installations, and it is unclear to me that this has sufficiently serious consequences to justify an exception, so for now, no back-patch. Reviewed-by: Richard Guo <guofenglinux@gmail.com> Discussion: http://postgr.es/m/CAMbWs4-mO3jMK4t_LgcJ+7Eo=NmGgkxettgRaVbJzZvVZ1koMA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/util/pathnode.c | modified | +11 −5 |
Discussion
- Consider low startup cost in add_partial_path 15 messages · 2019-09-27 → 2026-03-09