Re: Support logical replication of DDLs

Поиск
Список
Период
Сортировка
От rajesh singarapu
Тема Re: Support logical replication of DDLs
Дата
Msg-id CADgiWi49b_NYZOYZ8xBQM0JV887_Vta5q53cHF5ZArzNf9hd4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Support logical replication of DDLs  (Ajin Cherian <itsajin@gmail.com>)
Ответы Re: Support logical replication of DDLs  (Ajin Cherian <itsajin@gmail.com>)
Список pgsql-hackers
Thanks Ajin for the reply.

We "Create/Install" these trigger function at the time of "Create
publication", (CreatePublication())
but If I create a replication slot using something like "select * from
pg_create_logical_replication_slot('test1', 'test_decoding')"
we would not install these triggers in the system, so we dont get DDLs
decoded, right ?

I am a bit new to this postgres, is there anything missing in my understanding ?

thanks
Raejsh

On Tue, Nov 29, 2022 at 9:55 AM Ajin Cherian <itsajin@gmail.com> wrote:
>
> On Tue, Nov 29, 2022 at 1:29 PM rajesh singarapu
> <rajesh.rs0541@gmail.com> wrote:
> >
> > One question,
> >
> > I understand that we create/enable triggers on create publication command flow.
> > I am wondering how this works in case of logical replication using slots.
> >
> >
> > thanks
> > Rajesh
> >
> Rajesh,
>
> The triggers functions when invoked write these ddl commands to WAL
> and the logical decoding WAL sender which is
> registered for that replication slot decodes the WAL logged DDL
> commands and sends them as logical replication
> messages to the subscriber side. The apply worker on the subscriber
> side, then converts these messages to actual
> DDL commands and executes them.
>
> regards,
> Ajin Cherian
> Fujitsu Australia



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: [PoC] Improve dead tuple storage for lazy vacuum
Следующее
От: Ajin Cherian
Дата:
Сообщение: Re: Support logical replication of DDLs