Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Chad Trabant <chad(at)iris(dot)washington(dot)edu>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10
Date: 2018-02-23 22:31:20
Message-ID: CAKFQuwZgKScYL=prxnXFL827eF+e-4DxUi6vAO=VzUj=_eFs0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Adding -hackers to this in the interest of getting it committed by Monday's
wrap-up.

https://www.postgresql.org/message-id/6e375316-91a4-7825-ef8b-9b8915ab6980%402ndquadrant.com

David J.

On Sat, Feb 17, 2018 at 8:43 PM, Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

> On 2/5/18 10:33, Petr Jelinek wrote:
> >> 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.
>
> I think the filtering in pgoutput ought to make use of
> is_publishable_class() in some way. That takes care of non-tables such
> as materialized views, but it also filters out the information_schema
> tables for example. Right now, if you insert something into one of the
> IS tables, it gets shipped over the wire but is then dropped by the
> apply because there is no pg_subscription_rel entry of the table. That
> doesn't quite have the user-visible effect as this bug, but it's bogus
> nonetheless.
>
> So I propose this alternative patch that covers all these cases.
>
>

Attachment Content-Type Size
0001-Fix-filtering-of-unsupported-relations-in-pgoutput.patch application/octet-stream 2.1 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2018-02-24 03:14:43 Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10
Previous Message David Gould 2018-02-23 21:36:27 Re: maximum for auto_explain.log_min_duration doesn't seem to make sense

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-02-23 23:06:19 Re: Treating work_mem as a shared resource (Was: Parallel Hash take II)
Previous Message Robert Haas 2018-02-23 21:25:16 Re: parallel append vs. simple UNION ALL