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 1h3DWO-0006MQ-TH for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Mar 2019 05:30:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3DWN-00072q-Mr for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Mar 2019 05:30:43 +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 1h3DWN-000707-C6 for pgsql-hackers@lists.postgresql.org; Mon, 11 Mar 2019 05:30:43 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h3DWK-0006Ac-E3 for pgsql-hackers@postgresql.org; Mon, 11 Mar 2019 05:30:42 +0000 Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x2B5UbEm026914; Mon, 11 Mar 2019 14:30:37 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 5EAA0639A9B; Mon, 11 Mar 2019 14:30:37 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 4D89C639A95; Mon, 11 Mar 2019 14:30:37 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 36D434001D7; Mon, 11 Mar 2019 14:30:37 +0900 (JST) Message-ID: <5C85F24E.4050404@lab.ntt.co.jp> Date: Mon, 11 Mar 2019 14:29:50 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 Subject: Re: Oddity with parallel safety test for scan/join target in grouping_planner 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> In-Reply-To: <1962.1552281261@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Tom Lane Cc: Robert Haas , Pg Hackers X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk (2019/03/11 14:14), Tom Lane wrote: > Etsuro Fujita writes: >> (2019/03/11 13:06), Tom Lane wrote: >>> Is that the only possible outcome? Per Robert's summary quoted above, >>> it seems like it might be possible for the code to decide that the final >>> scan/join target to be parallel safe when it is not, leading to outright >>> wrong answers or query failures. > >> Maybe I'm missing something, but I think that if the final scan/join >> target is not parallel-safe, then the grouping target would not be >> parallel-safe either, by the construction of the two targets, so I don't >> think that we have such a correctness issue. > > 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. Best regards, Etsuro Fujita