Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bB4NF-0001xz-Jf for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jun 2016 18:08:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bB4NF-0002ha-6Z for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jun 2016 18:08:09 +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 1bB4NE-0002hU-RE for pgsql-hackers@postgresql.org; Thu, 09 Jun 2016 18:08:08 +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 1bB4NB-00068A-Q2 for pgsql-hackers@postgresql.org; Thu, 09 Jun 2016 18:08:08 +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 u59I83i9007993; Thu, 9 Jun 2016 14:08:03 -0400 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Don't generate parallel paths for rels with parallel-restricted In-reply-to: References: <5569.1465491729@sss.pgh.pa.us> <7106.1465494284@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 09 Jun 2016 13:57:15 -0400" Date: Thu, 09 Jun 2016 14:08:03 -0400 Message-ID: <7992.1465495683@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 Thu, Jun 9, 2016 at 1:44 PM, Tom Lane wrote: >> Well, yeah, you could remove it. It's inappropriate. The right place >> for such an error check is an attempt to actually access any data within >> a temp table, ie someplace in localbuf.c. There is no reason a worker >> shouldn't be allowed to look at the catalog entries for a temp table; >> they're just like any other catalog entries. > That's a possibility. Do you think it's a good idea to go making such > changes right now, with beta2 just around the corner? Do you want to > work on it? Are you asking me to work on it? I'll do it, if you don't want to. The rowtype test in has_parallel_hazard has made me acutely uncomfortable since I first saw it, because I don't think it's either maintainable or adequate for its alleged purpose. Never mind that it makes has_parallel_hazard probably several times slower than it needs to be. > There's one other related thing I'm concerned about, which is that the > code in namespace.c that manages pg_temp doesn't know anything about > parallelism. So it will interpret pg_temp to mean the pg_temp_NNN > schema for its own backend ID rather than the leader's backend ID. > I'm not sure that's a problem, but I haven't thought deeply about it. Hmmm. I'll take a look. > Could you answer my question about whether adjust_appendrel_attrs() > might translate Vars into non-Vars? Yes, absolutely. It may be that this code accidentally fails to fail because nothing is actually looking at the flag for a childrel ... but that's obviously not something to rely on long-term. > The code comment in that function > header doesn't seem to me to very clear about it. I'm guessing that > the answer is yes, so maybe the line of code you're complaining about > should just say: > childrel->reltarget_has_non_vars = true; > ...but that seems like it might suck. [ shrug... ] I'm still of the opinion that we should just drop reltarget_has_non_vars; the most charitable thing I can say about it is that it's premature optimization. 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