You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Use an explicit state flag to control PlaceHolderInfo creation.
Up to now, callers of find_placeholder_info() were required to passa flag indicating if it's OK to make a new PlaceHolderInfo. That'dbe fine if the callers had free choice, but they do not. Once webegin deconstruct_jointree() it's no longer OK to make more PHIs;while callers before that always want to create a PHI if it's notthere already. So there's no freedom of action, only the opportunityto cause bugs by creating PHIs too late. Let's get rid of that infavor of adding a state flag PlannerInfo.placeholdersFrozen, whichwe can set at the point where it's no longer OK to make more PHIs.This patch also simplifies a couple of call sites that were usingcomplicated logic to avoid calling find_placeholder_info() as muchas possible. Now that that lookup is O(1) thanks to the previouscommit, the extra bitmap manipulations are probably a net negative.Discussion:https://postgr.es/m/1405792.1660677844@sss.pgh.pa.us