Re: Proposal: Generic WAL logical messages

Поиск
Список
Период
Сортировка
Искать
От
Artur Zakirov
Тема
Re: Proposal: Generic WAL logical messages
Дата
Msg-id
56EBF655.6080407@postgrespro.ru
Ответ на
Список
Дерево обсуждения
Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Simon Riggs <simon@2ndQuadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Simon Riggs <simon@2ndQuadrant.com>
Re: Proposal: Generic WAL logical messages Craig Ringer <craig@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Tom Lane <tgl@sss.pgh.pa.us>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Simon Riggs <simon@2ndQuadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages Michael Paquier <michael.paquier@gmail.com>
Re: Proposal: Generic WAL logical messages Andres Freund <andres@anarazel.de>
Re: Proposal: Generic WAL logical messages David Steele <david@pgmasters.net>
Re: Proposal: Generic WAL logical messages Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Craig Ringer <craig@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Artur Zakirov <a.zakirov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Craig Ringer <craig@2ndquadrant.com>
Re: Proposal: Generic WAL logical messages Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Simon Riggs <simon@2ndQuadrant.com>
Re: Proposal: Generic WAL logical messages Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Proposal: Generic WAL logical messages Petr Jelinek <petr@2ndquadrant.com>
On 17.03.2016 15:42, Craig Ringer wrote:
>
>
> Would you mind sharing the plugin here? I could add it to
> src/test/modules and add some t/ tests so it runs under the TAP test
> framework.
>
>
> --
>   Craig Ringer http://www.2ndQuadrant.com/
>   PostgreSQL Development, 24x7 Support, Training & Services

Of course. I attached it.

In a provider node you need to set shared_preload_libraries to 
'pg_ddl_decode'.

In a subscriber node you need:
1 - install pg_ddl_decode by the command:

CREATE EXTENSION pg_ddl_decode;

2 - call the function:

SELECT ddl_create_slot('host=providerhost port=5432 dbname=db');

3 - after some DDL queries in provider you need to execute in a 
subscriber the command manually:

SELECT ddl_get_changes('host=providerhost port=5432 dbname=db');


I warn that this plugin has ugly code sometimes. And ddl_get_changes() 
has a infinite loop. But it shows concept of DDL replication.

Also this plugin uses some functions from pglogical_output and pglogical.


Earlier I have did tests with pglogical. I attached the patch for pglogical.

-- 
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: David Steele
Дата:
FAQ