Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3MCD-0002Om-G4 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Mar 2019 14:46:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3MCC-0003R1-84 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Mar 2019 14:46:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3MCB-0003Qt-TT for pgsql-hackers@lists.postgresql.org; Mon, 11 Mar 2019 14:46:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3MC6-0001jq-Tg for pgsql-hackers@postgresql.org; Mon, 11 Mar 2019 14:46:26 +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 x2BEkCc9022069; Mon, 11 Mar 2019 10:46:13 -0400 From: Tom Lane To: Etsuro Fujita cc: Robert Haas , Pg Hackers Subject: Re: Oddity with parallel safety test for scan/join target in grouping_planner In-reply-to: <5C85F24E.4050404@lab.ntt.co.jp> References: <5C75303E.8020303@lab.ntt.co.jp> <5C7908B9.5070407@lab.ntt.co.jp> <24818.1552077419@sss.pgh.pa.us> <5C85DC65.2050409@lab.ntt.co.jp> <32401.1552277190@sss.pgh.pa.us> <5C85ED63.8000805@lab.ntt.co.jp> <1962.1552281261@sss.pgh.pa.us> <5C85F24E.4050404@lab.ntt.co.jp> Comments: In-reply-to Etsuro Fujita message dated "Mon, 11 Mar 2019 14:29:50 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22067.1552315572.1@sss.pgh.pa.us> Date: Mon, 11 Mar 2019 10:46:12 -0400 Message-ID: <22068.1552315572@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Etsuro Fujita writes: > (2019/03/11 14:14), Tom Lane wrote: >> Seems to me it's the other way around: the final target would include >> all functions invoked in the grouping target plus maybe some more. >> So a non-parallel-safe grouping target implies a non-parallel-safe >> final target, but not vice versa. > I mean the final *scan/join* target, not the final target. Oh, of course. Yup, I was too tired last night :-(. So this is just a plan-quality problem not a wrong-answer problem. However, I'd still argue for back-patching into v11, on the grounds that this is a regression from v10. The example you just gave does produce the desired plan in v10, and I think it's more likely that people would complain about a regression from v10 than that they'd be unhappy because we changed it between 11.2 and 11.3. regards, tom lane