pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix filtering of unsupported relations in logical replication 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix filtering of unsupported relations in logical replication @ 2018-02-24 03:14 Peter Eisentraut <peter_e@gmx.net> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2018-02-24 03:14 UTC (permalink / raw) To: 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@iris.washington.edu> Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.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(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix filtering of unsupported relations in logical replication @ 2018-02-24 03:14 Peter Eisentraut <peter_e@gmx.net> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2018-02-24 03:14 UTC (permalink / raw) To: 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@iris.washington.edu> Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com> Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b9bf23abb0e9a63ecc5f4b68a8229146291270e5 Modified Files -------------- src/backend/catalog/pg_publication.c | 9 +++++++++ src/backend/replication/pgoutput/pgoutput.c | 3 +++ src/include/catalog/pg_publication.h | 1 + 3 files changed, 13 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-02-24 03:14 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-02-24 03:14 pgsql: Fix filtering of unsupported relations in logical replication Peter Eisentraut <peter_e@gmx.net> 2018-02-24 03:14 pgsql: Fix filtering of unsupported relations in logical replication Peter Eisentraut <peter_e@gmx.net>
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