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 1jEWhG-0005bF-S4 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2020 11:17:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEWhE-0007o9-IG for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2020 11:17:12 +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 1jEWhD-0007kT-Kl for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2020 11:17:12 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEWhA-0004ve-5J for pgsql-hackers@postgresql.org; Wed, 18 Mar 2020 11:17:10 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 951D54FA; Wed, 18 Mar 2020 07:16:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 18 Mar 2020 07:16:56 -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=0p3vTg1zWzjUvJB5v4Y8qeIbCTfwtDJeA5ypp6Y99 Q0=; b=VUbLVU8bto8xrxtswYN60MqRCXYAGpakb5Zdb9feWwsRo2vWmClVJZasY T7pSvqpoFW8H/Uh2ji06DIPPREewpwDkLjX9t5YdupqvKZk26c63FF1d6T0AgQ8h tf5POrkgco69dEzDsPDSb89Q/cSu/Rd8sA1fXtSvbUDq3JP/ybOnMb/kwakno9Rx wv63wQLc9O1n38A0gANoTLg36wvxP9iXYowNf+9ax75EWyzORbXyl0scZ94Qx4n1 E7ekl66FxV3PGUYUOoc8icy7pjIcW98wRMGFjmmmPpxWlyfFyN7XXa5GmJsW/QA7 ly0j/XR1o8/7AFS7dwo0jjQc6gahA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefjedgvdehucetufdoteggodetrfdotf 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 24D3C3062545; Wed, 18 Mar 2020 07:16:55 -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: <9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com> Date: Wed, 18 Mar 2020 12:16:53 +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 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services