[Bucardo-general] Workaround for lack of DDL triggers?

Isaac Reuben isaac at reuben.com
Thu Mar 17 08:01:21 UTC 2011


Would be really great to have DDL changes go through replication, but it's
not possible now due to Postgres not supporting triggers on DDL changes.
 But what about a workaround of creating a schema_migrations table to track
requested DDL changes (either just with a text field with the DDL statement
to execute, or a more application-specific description of the change to
make) and then a trigger on that table to execute the change?  So instead of
directly creating a table or column with CREATE/ALTER, you would insert a
row in the the "schema_migrations" table and let the trigger do the DDL work
for you.  Then the same row should end up on the other side, and could
activate the trigger to do the DDL changes there?

Super hacky, and maybe not possible at all, but was curious if anyone had
investigated that route.

Cheers,

- Isaac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20110317/fab1a9b9/attachment.html 


More information about the Bucardo-general mailing list