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.92) (envelope-from ) id 1jEvzv-0004ac-D5 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 14:18:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEvzu-0001SP-8h for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 14:18:10 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1jEvzt-0001SI-3N for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2020 14:18:10 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEvzo-0007vz-LB for pgsql-hackers@postgresql.org; Thu, 19 Mar 2020 14:18:08 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 5A2638FB; Thu, 19 Mar 2020 10:18:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 19 Mar 2020 10:18:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=A2AuV0zy9/xr8XEtnNszvms5mlm3YU96LNTY4gPwu Xc=; b=YWw7qQcoq6eutB/02lPSnS7XyiFqdQDk01RxKrqvkaWYZCZJjvHi/y3jf Uz7Uqs4Ub/418HJfCYMhIp30d0jkRM4ThRUrkA/+fqqn6CkWTR0DUOAiHTyDuk7W H5y65IY3TV7uImexV8k8ZNWaZXrVud8oEecoO76Mt9O+8bityjU3fJc9gKTmGIRk SVXf4WyRHvWH8+nQJ9L0FuB6evbKglGuYD8gw7tgdYZP2pHXshdHwalRY85ZzuoO H+rKW7G9o8FactDibcoy3EaVEESs/ppXTugooRNL5iJuCpXG40s4WIVXTbKAXjgR 4e4cYeVWxElJdpzKjG0KU5cLfeaaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefledgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegvddrvddufedrvdegudenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df2d5f1.dip0.t-ipconnect.de [93.242.213.241]) by mail.messagingengine.com (Postfix) with ESMTPA id BF91C3280059; Thu, 19 Mar 2020 10:17:59 -0400 (EDT) Subject: Re: adding partitioned tables to publications To: Amit Langote References: <825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com> <73a1877a-6f1d-9f2e-da51-bc2eb57e07d5@2ndquadrant.com> Cc: Rafia Sabih , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 19 Mar 2020 15:17:57 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-03-18 08:33, Amit Langote wrote: > By the way, I have rebased the patches, although maybe you've got your > own copies; attached. Looking through 0002 and 0003 now. The structure looks generally good. In 0002, the naming of apply_handle_insert() vs. apply_handle_do_insert() etc. seems a bit prone to confusion. How about something like apply_handle_insert_internal()? Also, should we put each of those internal functions next to their internal function instead of in a separate group like you have it? In apply_handle_do_insert(), the argument localslot should probably be remoteslot. In apply_handle_do_delete(), the ExecOpenIndices() call was moved to a different location relative to the rest of the code. That was probably not intended. In 0003, you have /* TODO, use inverse lookup hashtable? */. Is this something you plan to address in this cycle, or is that more for future generations? 0003 could use some more tests. The one test that you adjusted just ensures the data goes somewhere instead of being rejected, but there are no tests that check whether it ends up in the right partition, whether cross-partition updates work etc. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services