Improve ExecFindInitialMatchingSubPlans's subplan renumbering logic.
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: 912601211b5cdf5ee0eca9fa7774a46f1c7ca8b9@mail.gmail.com

lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb