Re: [BUGS] BUG #14785: Logical replication does not work after addinga column. Bug? - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: [BUGS] BUG #14785: Logical replication does not work after addinga column. Bug?
Date
Msg-id 4dfb4e26-9542-85d6-ff61-9e7080796b0e@2ndquadrant.com
Whole thread Raw
In response to [BUGS] BUG #14785: Logical replication does not work after adding a column.Bug?  (yxq@o2.pl)
Responses Re: [BUGS] BUG #14785: Logical replication does not work afteradding a column. Bug?  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
On 8/22/17 15:34, Andres Freund wrote:
> On 2017-08-22 15:22:41 -0400, Peter Eisentraut wrote:
>> When you add a column on the publication side, you also need to add it
>> on the subscription side, otherwise there is nowhere to put the data.
> 
> Op's sql shows that that's done. The problem is the table rewrite not
> being handled nicely by logical decoding / replication.

OK, I see it now.

The problem happens on the publisher side.  After the table rewrite on
the publisher side, the output plugin starts sending the wrong relname.

The name comes straight from RelationGetRelationName() (in
logicalrep_write_rel()) with the Relation that gets passed into the
pgoutput_change() callback, so there doesn't appear to be an obvious
logic error in the output plugin.

Any ideas?  Do we need to renew a snapshot somehow, perhaps?

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema access privileges.
Next
From: Fujimoto Seiji
Date:
Subject: Re: [BUGS] BUG #14788: `pg_restore -c` won't restore schema accessprivileges.