From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
To: Chad Trabant <chad@iris.washington.edu>
To: David G. Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10
Date: Fri, 23 Feb 2018 22:14:43 -0500
Message-ID: <bc5ac138-71a1-664e-49d1-b7bfa177a5be@2ndquadrant.com> (raw)
In-Reply-To: <6e375316-91a4-7825-ef8b-9b8915ab6980@2ndquadrant.com>
References: <151753299917.1235.5710750500940066850@wrigleys.postgresql.org>
<CAKFQuwbXMMybbA-p11=P3D4Z0gbYq2hyDE1YV3JHRnu+UF3Abw@mail.gmail.com>
<161542b1c98.27af.478e5036e088b5aaf247fa13bcb9f071@iris.washington.edu>
<5754c88e-0ea5-ee34-5b4b-e50a6c66822f@2ndquadrant.com>
<6e375316-91a4-7825-ef8b-9b8915ab6980@2ndquadrant.com>
On 2/17/18 22:43, Peter Eisentraut 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.
Committed, and also added a new test in the master branch.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, petr.jelinek@2ndquadrant.com, chad@iris.washington.edu, david.g.johnston@gmail.com
Subject: Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10
In-Reply-To: <bc5ac138-71a1-664e-49d1-b7bfa177a5be@2ndquadrant.com>
References: <151753299917.1235.5710750500940066850@wrigleys.postgresql.org> <CAKFQuwbXMMybbA-p11=P3D4Z0gbYq2hyDE1YV3JHRnu+UF3Abw@mail.gmail.com> <161542b1c98.27af.478e5036e088b5aaf247fa13bcb9f071@iris.washington.edu> <5754c88e-0ea5-ee34-5b4b-e50a6c66822f@2ndquadrant.com> <6e375316-91a4-7825-ef8b-9b8915ab6980@2ndquadrant.com> <bc5ac138-71a1-664e-49d1-b7bfa177a5be@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