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 1iRa6P-0004nS-Og for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2019 11:00:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iRa6O-0004bB-7l for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2019 11:00:52 +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 1iRa6N-0004b4-E7 for pgsql-hackers@lists.postgresql.org; Mon, 04 Nov 2019 11:00:52 +0000 Received: from [66.111.4.29] (helo=out5-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRa67-000313-QM for pgsql-hackers@postgresql.org; Mon, 04 Nov 2019 11:00:50 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 26A7C21D6E; Mon, 4 Nov 2019 06:00:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 04 Nov 2019 06:00:14 -0500 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=fm1; bh=cEdgbYwZS/TD32mCqaFv8qHhLKEhOAn8BZ6yrAimn /M=; b=brK6QK66NmlAe0HUe9FHVYZSpuNSldku/lnVCJ99N2YsJ3Mr0Z0dr9vWd 3r5603GIc6P/XeApDRV5a4nXkqvHHUiIBPDM3o403GFVLI33OZVs9NFzHIGy26eV eoI73wKVBmjYPVq9i+NKbIPJTwjlm2xigrCG7VKQUeCCGHsZ7nD/zNow5wbY31jy odVeDOwwffkIhOKwVomv5Y3qUvk00ZjVNyMYo3/+Iwg75DPoZuoYGxFO3qTDLDGQ 2b8bOXEmqWXYfk0cizKKELQ851UB3COcoENKRyRJNrNDpj1BPmEq1CU83n1ojLob Qak917vsQVpx1SazzWBrQeWiLoYPw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddufedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegvddrudegjedrjeelnecurfgrrhgrmhepmhgrihhlfhhroh hmpehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomhen ucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from april.pezone.net (p5df2934f.dip0.t-ipconnect.de [93.242.147.79]) by mail.messagingengine.com (Postfix) with ESMTPA id CA3E780064; Mon, 4 Nov 2019 06:00:12 -0500 (EST) Subject: Re: adding partitioned tables to publications To: Amit Langote , Rafia Sabih References: Cc: PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <037d3133-1689-108c-360d-b782e3209cfb@2ndquadrant.com> Date: Mon, 4 Nov 2019 12:00:11 +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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.29 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This patch seems excessively complicated to me. Why don't you just add the actual partitioned table to pg_publication_rel and then expand the partition hierarchy in pgoutput (get_rel_sync_entry() or GetRelationPublications() or somewhere around there). Then you don't need to do any work in table DDL to keep the list of published tables up to date. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services