On Sat, Feb 2, 2019 at 7:19 PM David Rowley <david.row...@2ndquadrant.com> wrote: > I think we do need to ensure that the PartitionDesc matches between > worker and leader. Have a look at choose_next_subplan_for_worker() in > nodeAppend.c. Notice that a call is made to > ExecFindMatchingSubPlans().
Thanks for the tip. I see that code, but I'm not sure that I understand why it matters here. First, if I'm not mistaken, what's being returned by ExecFindMatchingSubPlans is a BitmapSet of subplan indexes, not anything that returns to a PartitionDesc directly. And second, even if it did, it looks like the computation is done separately in every backend and not shared among backends, so even if it were directly referring to PartitionDesc indexes, it still won't be assuming that they're the same in every backend. Can you further explain your thinking? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company