Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
We have a use case where we don't want replicate_ddl_command to execute locally. Our custom event triggers are capturing all DDL and then call replicate_ddl_command. This fails because the DDL is being executed twice - once by the SQL statement itself, and once by replicate_ddl_command in the event trigger.
This change adds an execute_locally argument in replicate_ddl_command that defaults to true for backwards compatibility. I verified this works like I would expect it to in both cases, but if there are greater impacts under the hood that I'm not seeing please let me know. I only knew enough C to make this minor change and have not made contributions to other open source projects so this is a bit of a first for me.
2nd Quadrant,
We have a use case where we don't want
replicate_ddl_command
to execute locally. Our custom event triggers are capturing all DDL and then callreplicate_ddl_command
. This fails because the DDL is being executed twice - once by the SQL statement itself, and once byreplicate_ddl_command
in the event trigger.This change adds an
execute_locally
argument inreplicate_ddl_command
that defaults to true for backwards compatibility. I verified this works like I would expect it to in both cases, but if there are greater impacts under the hood that I'm not seeing please let me know. I only knew enough C to make this minor change and have not made contributions to other open source projects so this is a bit of a first for me.