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 1jEqBR-0001jd-FF for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 08:05:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEqBQ-0001tu-6t for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Mar 2020 08:05:40 +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 1jEqBP-0001tn-3c for pgsql-hackers@lists.postgresql.org; Thu, 19 Mar 2020 08:05:39 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEqBM-0001Aa-62 for pgsql-hackers@postgresql.org; Thu, 19 Mar 2020 08:05:37 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 86F865C00F9; Thu, 19 Mar 2020 04:05:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 19 Mar 2020 04:05:34 -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=Dlbgnb3HH65AwujmTwPepdv1x38zbqxLP93oagjeR RU=; b=ZIjdzw1FnyXQPGhGvkF6vmgUJt8tAUmHXh0J4zpsw8aqyZI/2X9oSDC3t 4aVtNTi1kmVnag/k2bLYuYU46fgXUjlnn+DfbfDZufev3k9FIStsiOU0JEFbc0jW ut1PbfvPssAM7+JgqCJA6pnH2i2KyRxPWwSaRXH9Eni7hwDBecZawvcNEIT0yDQF evWutRTflL+dpyRz24PIQVrMGiMuxINPfcjX+R5gYQIexlyeYZRUsvlut/WihO7t ShWI+nPwkvvdYLMuwZGcFwxWjhg5AL6lWKAVKy/JoLAvcZj4ujK4EhFdPlQOrDD0 2TVzxB9hEynSWOUXz/X2IkwAtsXMg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefkedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnh guqhhurggurhgrnhhtrdgtohhmqeenucffohhmrghinhepvdhnughquhgrughrrghnthdr tghomhenucfkphepleefrddvgedvrddvudefrddvgedunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht sedvnhguqhhurggurhgrnhhtrdgtohhm 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 689CB30618B7; Thu, 19 Mar 2020 04:05:33 -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> <9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com> Cc: Rafia Sabih , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 19 Mar 2020 09:05:32 +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 15:19, Amit Langote wrote: > On Wed, Mar 18, 2020 at 8:16 PM Peter Eisentraut > wrote: >> On 2020-03-18 04:06, Amit Langote wrote: >>> + if (isnull || !remote_is_publishable) >>> + ereport(ERROR, >>> + (errmsg("table \"%s.%s\" on the publisher is not publishable", >>> + nspname, relname))); >>> >>> Maybe add a one-line comment above this to say it's an "not supposed >>> to happen" error or am I missing something? Wouldn't elog() suffice >>> for this? >> >> On second thought, maybe we should just drop this check. The list of >> tables that is part of the publication was already filtered by the >> publisher, so this query doesn't need to check it again. We just need >> the relkind to be able to construct the COPY command, but we don't need >> to second-guess it beyond that. > > Agreed. Committed with that change then. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services