On Tue, Mar 28, 2017 at 11:08 PM, Tomas Vondra <tomas.von...@2ndquadrant.com> wrote: > Maybe. It depends on how valuable it's to keep Gather and GatherMerge > similar - having nreaders in one and not the other seems a bit weird. But > maybe the refactoring would remove it from both nodes?
Yeah, it appears to be the case that both Gather and GatherMerge inevitably end up with nworkers_launched == nreaders, which seems dumb. If we're going to clean this up, I think we should make them both match. > Also, it does not really solve the issue that we're using 'nreaders' or > 'nworkers_launched' to access array with one extra element. I'm not clear that there's any fundamental solution to that problem other than trying to clarify it through comments. Meantime, I think it's not good to leave this crashing, so I pushed Rushabh's v2 patch for the actual crash for now. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers