[Bucardo-general] Two masters, replication works but only one of the triggers fire

Torbjørn Kristoffersen tk at mezzanineware.com
Sun Sep 1 17:32:34 UTC 2013


On Sat, Aug 31, 2013 at 5:23 AM, Greg Sabino Mullane <greg at endpoint.com>wrote:

> On Fri, Aug 30, 2013 at 04:29:58PM +0200, Torbjørn Kristoffersen wrote:
> > I have a problem with Bucardo (latest stable) - I have a table "person"
> > that has a trigger, updating a table called "archive" on insert/update.
> >
> > This works fine, except when person table is replicated with Bucardo (two
> > masters, with standard conflict set to 'latest').
> >
> > The trigger only seems to fire on the DB where the change was initially
> > performed, but the trigger is always ignored on the other database.
> >
> > The data in "person" is however replicated perfectly.
> >
> > Unfortunately it's absolutely necessary that both triggers fire. Is this
> > perhaps a bug?  It seems like a common requirement.
> >
> > PS - if it matters, the trigger adds a row to a table that is not in the
> > goat table.  It's a table that is kept outside of replication.
>
> This is by design. All triggers and rules are disabled when Bucardo copies
> data from table to table. The canonical fix is to put the updated table
> ("archive") into the sync with the original table ("person"). Another
> solution is to set the trigger to "always", which will ensure that it fires
> even when Bucardo is adding rows.
>
> http://www.postgresql.org/docs/9.2/static/sql-altertable.html
>
> Thank you for your advice, Greg. I think we're going to go for the
"ALWAYS" option as described in the PostgreSQL manual.

Thanks,
Tobie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130901/854fc3ea/attachment.html>


More information about the Bucardo-general mailing list