BUG #15044: materialized views incompatibility with logicalreplication in postgres 10

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема BUG #15044: materialized views incompatibility with logicalreplication in postgres 10
Дата
Msg-id CAKFQuwbXMMybbA-p11=P3D4Z0gbYq2hyDE1YV3JHRnu+UF3Abw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #15044: materialized views incompatibility with logicalreplication in postgres 10  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10
Список pgsql-bugs
On Thursday, February 1, 2018, PG Bug reporting form <noreply@postgresql.org> wrote:


Bug reference:      15044

The built-in logical replication in postgres 10 is documented as not being
able to replication materialized views, notably here:
https://www.postgresql.org/docs/10/static/logical-replication-restrictions.html

Unfortunately, there appears to be an incompatibility with logical
replication and materialized views.
 
[...]
# Create publication and subscription
psql -p 5433 -d postgres -c "CREATE PUBLICATION pub FOR ALL TABLES;"

[...] 
# Create materialized view on publisher
psql -p 5433 -d postgres -c "CREATE MATERIALIZED VIEW mvid AS SELECT id FROM
testtable;"

With that CREATE MATERIALIZED VIEW statement the replication broken, with
these errors in the subscriber's log:

2018-02-01 16:34:27.639 PST [68409] ERROR:  logical replication target
relation "public.mvid" does not exist

It seems the work-around is to not use "for all tables" in your publication definition.

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...

David J.



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15044: materialized views incompatibility with logicalreplication in postgres 10
Следующее
От: Chad Trabant
Дата:
Сообщение: Re: BUG #15044: materialized views incompatibility with logical replication in postgres 10