Re: Proposal: Generic WAL logical messages

Поиск
Список
Период
Сортировка
От Artur Zakirov
Тема Re: Proposal: Generic WAL logical messages
Дата
Msg-id 56EBF655.6080407@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Proposal: Generic WAL logical messages  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Proposal: Generic WAL logical messages  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
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
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean
Следующее
От: David Steele
Дата:
Сообщение: Re: eXtensible Transaction Manager API (v2)