Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fiwQs-0005oa-2b for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 06:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fiwQp-00040Y-J2 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 06:40:55 +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.89) (envelope-from ) id 1fiwQp-00040R-8G for pgsql-hackers@lists.postgresql.org; Fri, 27 Jul 2018 06:40:55 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fiwQm-00067Y-EM for pgsql-hackers@postgresql.org; Fri, 27 Jul 2018 06:40:54 +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 w6R6ehRn025822; Fri, 27 Jul 2018 15:40:43 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id E79DC638E96; Fri, 27 Jul 2018 15:40:42 +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 DC43D638C4E; Fri, 27 Jul 2018 15:40:42 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id D635D400B4F; Fri, 27 Jul 2018 15:40:42 +0900 (JST) Message-ID: <5B5ABE70.40606@lab.ntt.co.jp> Date: Fri, 27 Jul 2018 15:40:48 +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: print_path is missing GatherMerge and CustomScan support References: <20180718062202.GC8565@paquier.xyz> <20180719000722.GA3411@paquier.xyz> <5B5958D2.7060805@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Robert Haas Cc: Ashutosh Bapat , Michael Paquier , Masahiko Sawada , PostgreSQL-development X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk (2018/07/27 4:50), Robert Haas wrote: > On Thu, Jul 26, 2018 at 1:14 AM, Etsuro Fujita > wrote: >> because we currently don't consider gathering partial child-scan or >> child-join paths. I think we might consider that in future, though. > > You generally want to put the Gather node as high up in the plan tree > as possible. I think the only case in which this is beneficial is if > you can't put the Gather or Gather Merge node above the Append because > only some of the children are parallel-safe. In that case, a separate > Gather per child can be better than no parallelism at all. It's a > rare case, but it can happen. Actually, I thought we had code for this > already: see the end of apply_scanjoin_target_to_paths(). Agreed. Thanks for the explanation! (I think that at least currently, there is no need for the Gather and GatherMerge cases in reparameterize_path_by_child, but I don't object to keeping those as-is there.) Best regards, Etsuro Fujita