From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix filtering of unsupported relations in logical replication |
Date: | 2018-02-24 03:14:05 |
Message-ID: | E1epQHl-00025e-Kv@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix filtering of unsupported relations in logical replication
In the pgoutput plugin, skip changes for relations that are not
publishable, per is_publishable_class(). This concerns in particular
materialized views and information_schema tables. While those relations
cannot be part of a publication, per existing checks, they will be
considered by a FOR ALL TABLES publication. A subscription would not
actually apply changes for those relations, again per existing checks,
but trying to match incoming changes to local tables on the subscriber
would lead to errors if no matching local table exists. Skipping those
changes on the publisher avoids sending useless changes and eliminates
the error.
Bug: #15044
Reported-by: Chad Trabant <chad(at)iris(dot)washington(dot)edu>
Reviewed-by: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bc1adc651b8e60680aea144d51ae8bc78ea6b2fb
Modified Files
--------------
src/backend/catalog/pg_publication.c | 9 ++++++
src/backend/replication/pgoutput/pgoutput.c | 3 ++
src/include/catalog/pg_publication.h | 1 +
src/test/subscription/t/009_matviews.pl | 45 +++++++++++++++++++++++++++++
4 files changed, 58 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-02-24 15:11:30 | pgsql: Check error messages in SSL tests |
Previous Message | Tom Lane | 2018-02-24 01:59:00 | Re: pgsql: Fix deadlock hazard in CREATE INDEX CONCURRENTLY |