Re: Logical replication and inheritance

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical replication and inheritance
Date: 2017-04-14 18:53:23
Message-ID: 867951a8-2222-5bfe-f268-10b70b6403d0@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/13/17 06:48, Amit Langote wrote:
> That is an important consideration because of pg_dump. See below:
>
> create table foo (a int);
> create table bar () inherits (foo);
> create publication mypub for table foo; -- bar is added too.
>
> $ pg_dump -s | psql -e test
> <snip>
> ALTER PUBLICATION mypub ADD TABLE foo;
> ERROR: relation "bar" is already member of publication "mypub"

To fix this, pg_dump should emit ADD TABLE ONLY foo.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-14 18:54:21 Re: Logical replication and inheritance
Previous Message Andreas Karlsson 2017-04-14 18:51:39 Re: Cutting initdb's runtime (Perl question embedded)