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

From Ajin Cherian
Subject Re: Support logical replication of DDLs
Date
Msg-id CAFPTHDbXuO5_hDk_rDYCnXFs0WcYB4-mnP6Wr7QS9ekB+MHhTw@mail.gmail.com
Whole thread Raw
In response to Re: Support logical replication of DDLs  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Support logical replication of DDLs
List pgsql-hackers
There's a bug in this patch, where if there are multiple publications
that publish ddls,
then multiple event triggers will write multiple WAL records.
This will result in duplicate ddls statements being published.
This will also create multiple WAL records.
To avoid this,
I've added a fix in event_trigger invoking logic
(EventTriggerCommonSetup()) patch-6,
to check for duplicate publication ddl deparsing event trigger functions
and if there are duplicates, only the first event trigger function is
invoked and the rest ignored.
This way, even if there are multiple publications that publish ddls,
then only one set
event trigger functions are invoked.

regards,
Ajin Cherian
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning
Next
From: Laurenz Albe
Date:
Subject: Re: Make EXPLAIN generate a generic plan for a parameterized query