pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Rafia Sabih <rafia.pghackers@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: adding partitioned tables to publications
Date: Wed, 18 Mar 2020 12:16:53 +0100
Message-ID: <9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com> (raw)
In-Reply-To: <CA+HiwqFBni-cXy5NBN0PdwxidXgcCEio0N_AOnOM0pR2dMWUyA@mail.gmail.com>
References: <CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail.gmail.com>
	<CA+HiwqGUZJYaJSM5cPKKFrFSJbTsDyJ9o4Vd=M2d7i5brKvGbA@mail.gmail.com>
	<b6d8519b-353f-1949-79b5-460a6712e20f@2ndquadrant.com>
	<CA+HiwqHScTtXD97yC_ZRLk7TXf+0HYH+UeDvACf2Q-LBH-2ctw@mail.gmail.com>
	<CA+FpmFfKmsNww_C5hWU-=wg9h3cyV7vZcCUKWrrhtLkteUtY4w@mail.gmail.com>
	<CA+HiwqE2ie6_T01fMzsf7c5=hCGoVdj2yTStCJ78zOmayMVWbw@mail.gmail.com>
	<825b31ea-ad9f-21d1-29b6-2a494513458d@2ndquadrant.com>
	<CA+HiwqEqm3xvnMHjstkrECrpVv9R7YgYYpRHHVrffSvA9Zrf9g@mail.gmail.com>
	<CA+HiwqGiFpkHxx0mc2zpdJLGzfqEaqsdqUZurNto9kbkwzcQ1w@mail.gmail.com>
	<CA+FpmFfve1TtLvj5CwpgEZrjNiFG-EWh4ywpbtrB7-UTkZo2gg@mail.gmail.com>
	<CA+HiwqHfV73E4aJxX6d79xSEZjp+stFKnD0+7OktPw2_tD=pYg@mail.gmail.com>
	<73a1877a-6f1d-9f2e-da51-bc2eb57e07d5@2ndquadrant.com>
	<CA+HiwqFjo=vCXDdkwprf6ipaVeegCpW79n-Ds8BK5cNQsSey2A@mail.gmail.com>
	<d760bb60-563c-dd01-9903-f9337d50e8a6@2ndquadrant.com>
	<CA+HiwqFBni-cXy5NBN0PdwxidXgcCEio0N_AOnOM0pR2dMWUyA@mail.gmail.com>

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





view thread (86+ messages)  latest in thread

Message-ID: <9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com>
Permalink:  ../9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com/
Also on:    postgresql.org/message-id/9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, amitlangote09@gmail.com, rafia.pghackers@gmail.com
  Subject: Re: adding partitioned tables to publications
  In-Reply-To: <9dfea57a-41a6-06d4-ad18-463aeec7ea91@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox