Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewnls-0000gV-RE for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Mar 2018 11:43:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewnlr-0001nS-LM for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Mar 2018 11:43:39 +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.89) (envelope-from ) id 1ewnlr-0001nH-DZ for pgsql-hackers@lists.postgresql.org; Fri, 16 Mar 2018 11:43:39 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewnlo-0007Yi-6j for pgsql-hackers@postgresql.org; Fri, 16 Mar 2018 11:43:38 +0000 Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w2GBhW07011182; Fri, 16 Mar 2018 20:43:32 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id B7BAB639504; Fri, 16 Mar 2018 20:43:32 +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 AC8CC63933C; Fri, 16 Mar 2018 20:43:32 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id A87FC400B0B; Fri, 16 Mar 2018 20:43:32 +0900 (JST) Message-ID: <5AABADE2.3040805@lab.ntt.co.jp> Date: Fri, 16 Mar 2018 20:43:30 +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: ON CONFLICT DO UPDATE for partitioned tables References: <3c3bbb2c-c28f-5b09-c124-b99e2231fe9b@lab.ntt.co.jp> <20180302153610.2yl4j2wmpw7mntge@alvherre.pgsql> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Pavan Deolasee Cc: Alvaro Herrera , Amit Langote , Pg Hackers X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk (2018/03/16 19:43), Pavan Deolasee wrote: > On Fri, Mar 2, 2018 at 9:06 PM, Alvaro Herrera > wrote: > @@ -106,6 +120,9 @@ typedef struct PartitionTupleRouting > int num_subplan_partition_offsets; > TupleTableSlot *partition_tuple_slot; > TupleTableSlot *root_tuple_slot; > + List **partition_arbiter_indexes; > + TupleTableSlot **partition_conflproj_slots; > + TupleTableSlot **partition_existing_slots; > } PartitionTupleRouting; > I am curious why you decided to add these members to > PartitionTupleRouting structure. Wouldn't ResultRelationInfo be a better > place to track these or is there some rule that we follow? I just started reviewing the patch, so maybe I'm missing something, but I think it would be a good idea to have these in that structure, not in ResultRelInfo, because these would be required only for partitions chosen via tuple routing. Best regards, Etsuro Fujita