Improve ExecFindInitialMatchingSubPlans's subplan renumbering logic.

We don't need two passes if we scan child partitions before parents,
as that way the children's present_parts are up to date before they're
needed.  I (tgl) think there's actually a bug being fixed here, for the
case of an intermediate partitioned table with no direct leaf children,
but haven't attempted to construct a test case to prove it.

David Rowley

Discussion: 
https://postgr.es/m/cakjs1f-6godrngetdpxcnapme2h2htztb6lmtfdmcyaaoe0...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/69025c5a07a10c842bfbcb62d4af1221e5ce7e85

Modified Files
--------------
src/backend/executor/execPartition.c | 68 ++++++++++++------------------------
1 file changed, 22 insertions(+), 46 deletions(-)

Reply via email to