Re: Support logical replication of DDLs - Mailing list pgsql-hackers

From Ajin Cherian
Subject Re: Support logical replication of DDLs
Date
Msg-id CAFPTHDbunLJ8MA5gJ9Ym89EFAHfW7=nSOi42k9jQG+Z4ZgT1Fg@mail.gmail.com
Whole thread Raw
In response to Re: Support logical replication of DDLs  (rajesh singarapu <rajesh.rs0541@gmail.com>)
Responses Re: Support logical replication of DDLs
List pgsql-hackers
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 by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Avoid streaming the transaction which are skipped (in corner cases)
Next
From: Thomas Munro
Date:
Subject: Re: Collation version tracking for macOS