Re: BUG #15044: materialized views incompatibility with logicalreplication in postgres 10 - Mailing list pgsql-bugs

From Petr Jelinek
Subject Re: BUG #15044: materialized views incompatibility with logicalreplication in postgres 10
Date
Msg-id 5754c88e-0ea5-ee34-5b4b-e50a6c66822f@2ndquadrant.com
Whole thread Raw
In response to Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10  (Chad Trabant <chad@iris.washington.edu>)
Responses Re: BUG #15044: materialized views incompatibility with logicalreplication in postgres 10
List pgsql-bugs
Hi,

On 02/02/18 02:39, Chad Trabant wrote:
> On February 1, 2018 17:16:08 "David G. Johnston"
> <david.g.johnston@gmail.com> wrote:
>>> Bug reference:      15044
>>
>> It seems the work-around is to not use "for all tables" in your
> publication
>> definition.
> 
> 
> Indeed.  My real world case 700+ tables with semi regular additions and
> two materialized views so ALL TABLES was the right fit.
> 
> 
>> As described it does seem bugged.  The table matview itself is not being
>> published, as documented, but knowledge of its existence as part of the
>> publication is...
> 
> 
> Exactly.  The matview does not show up in pg_publication_tables but it's
> registered at some level.
> 

Indeed this is a bug. For normal publications we take care of this when
adding the relation to the publication but since ALL TABLES publications
don't check for membership we have to filter this directly in the output
plugin.

The attached patch should fix it (CCing to PeterE as the original
committer).

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15051: Additional information to bug
Next
From: PG Bug reporting form
Date:
Subject: BUG #15052: unresponsive client