Re: Feature Request - DDL deployment with logical replication

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: Feature Request - DDL deployment with logical replication
Дата
Msg-id CAN-RpxAbGR1msRMLhLq1EKdeHrUtHGC2MpSR+6MENskjTB9VWg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature Request - DDL deployment with logical replication  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Ответы Re: Feature Request - DDL deployment with logical replication  (David Fetter <david@fetter.org>)
Список pgsql-hackers


On Fri, Mar 30, 2018 at 9:26 AM, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote:


Our team in PostgresPro is also very interested in this discussion, because we are using logical decoding in multimaster.
Right now in multimaster DDLs are replicated in this same way as in pglogical, using "logical messages" with correspondent DDL statements.
There are a couple of problems related with this approach, for example mix of DDL with DML (create table as...) which we have addressed in multimaster.

As an alternative we have considered possibility to replicate updates of catalog tables. In this case we need  to address the following issues:
1. Map OIDs
2. Perform direct manipulation with files (i.e. truncate, alter table,...)

One very important note here is that since truncate is not replicated there are cases where people are relying on current behaviour.  For example, we are going to use logical replication specifically for this reason as a way of replacing our current FDW-based push approach.  If truncate is ever replicated, it would be really nice to be able to specify not to replicate it on the subscription level.
 
3. Send invalidations

Looks like it will be not so easy to implement this approach because we have to repeat or somehow reuse substantial part of executor code for this DDL nodes.
And definitely this approach works only for Postgres-to-Postgres replication.

So it will be very interesting for us to know roadmap for DDL support in logical replication.


--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





--
Best Regards,
Chris Travers
Database Administrator

Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com 
Saarbrücker Straße 37a, 10405 Berlin

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

Предыдущее
От: Edmund Horner
Дата:
Сообщение: Re: pgbench doc typos
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Moving relation extension locks out of heavyweightlock manager