Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bB3Lf-0007LP-60 for pgsql-committers@arkaria.postgresql.org; Thu, 09 Jun 2016 17:02:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bB3Le-00053j-H1 for pgsql-committers@arkaria.postgresql.org; Thu, 09 Jun 2016 17:02:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bB3LR-0004Zr-3O for pgsql-committers@postgresql.org; Thu, 09 Jun 2016 17:02:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bB3LO-0002t0-N3; Thu, 09 Jun 2016 17:02:11 +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 u59H29LD005570; Thu, 9 Jun 2016 13:02:09 -0400 From: Tom Lane To: Robert Haas cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Don't generate parallel paths for rels with parallel-restricted In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Thu, 09 Jun 2016 16:43:49 -0000" Date: Thu, 09 Jun 2016 13:02:09 -0400 Message-ID: <5569.1465491729@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-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Robert Haas writes: > Don't generate parallel paths for rels with parallel-restricted outputs. Surely this bit is wrong on its face: @@ -971,6 +980,7 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel, adjust_appendrel_attrs(root, (Node *) rel->reltarget->exprs, appinfo); + childrel->reltarget_has_non_vars = rel->reltarget_has_non_vars; /* * We have to make child entries in the EquivalenceClass data The entire point of what we are doing here is that Vars might get replaced with things that are not Vars. See the comment a dozen lines above. More generally, if we need such a flag (which I doubt really), perhaps it should be part of PathTarget rather than expecting that it can successfully be maintained separately? It seems like the only reason that we would need such a flag is that applying has_parallel_hazard() to a Var is a bit expensive thanks to the typeid_is_temp() test --- but if you ask me, that test is stupid and should be removed. What's the argument for supposing that a temp table's rowtype is any more mutable intra-query than any other rowtype? regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers