Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF2lc-0001o6-CT for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2016 17:13:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bF2lb-0006pz-DS for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2016 17:13:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bF2la-0006ps-Qc for pgsql-hackers@postgresql.org; Mon, 20 Jun 2016 17:13:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bF2lX-0001BT-Ie for pgsql-hackers@postgresql.org; Mon, 20 Jun 2016 17:13:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u5KHDYks029553; Mon, 20 Jun 2016 13:13:34 -0400 From: Tom Lane To: Robert Haas cc: Peter Eisentraut , Amit Kapila , Noah Misch , =?UTF-8?B?Q2zDqW1lbnQgUHLDqXZvc3Q=?= , PostgreSQL-development Subject: Re: parallel.c is not marked as test covered In-reply-to: References: <20160607052716.GA766951@tornado.leadboat.com> <20160608034342.GA804701@tornado.leadboat.com> <58cd047c-deba-0863-b279-56b931237176@2ndquadrant.com> <24863.1466311214@sss.pgh.pa.us> <13382.1466350602@sss.pgh.pa.us> <31689.1466389410@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 20 Jun 2016 12:06:52 -0400" Date: Mon, 20 Jun 2016 13:13:34 -0400 Message-ID: <29552.1466442814@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Sun, Jun 19, 2016 at 10:23 PM, Tom Lane wrote: >> Personally, I'm +1 for such tinkering if it makes the feature either more >> controllable or more understandable. After reading the comments at the >> head of nodeGather.c, though, I don't think that single_copy is either >> understandable or useful, and merely renaming it won't help. Apparently, >> it runs code in the worker, except when it doesn't, and even when it does, >> it's absolutely guaranteed to be a performance loss because the leader is >> doing nothing. What in the world is the point? > The single_copy flag allows a Gather node to have a child plan which > is not intrinsically parallel. OK, but I'm very dubious of your claim that this has any use except for testing purposes. It certainly has no such use today. Therefore, the behavior of falling back to running in the leader seems like an anti-feature to me. If we want to test running in a worker, then we want to test that, not maybe test it. I propose that the behavior we actually want here is to execute in a worker, full stop. If we can't get one, wait till we can. If we can't get one because no slots have been allocated at all, fail. That would make the behavior deterministic enough for the regression tests to rely on it. And while I don't know what this mode should be called, I'm pretty sure that neither "single_copy" nor "pipeline" are useful descriptions. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers