Re: BDR replication and table triggers

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: jamesadams89 <jamesadams80(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: BDR replication and table triggers
Date: 2017-05-03 03:29:44
Message-ID: CAMsr+YGPF_gd+aOfucpiC-ag93SrnEG5Og=X_4k+LjMq_FV8ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> However if I perform any INSERT, UPDATE or DELETE operations on
> DB2 and these changes propagate over to DB1 via BDR I do not see DB1 firing
> any triggers. Is this intended behavior?

Yes.

> My current understanding is that
> BDR is unable to invoke Postgres triggers as it operates on the rows
> directly, a layer below Postgres. Is this Correct?

Yes.

> Is there any mechanism
> that exists that could provide notifications to a listening application when
> BDR makes changes to the underlying database?

You could listen to an underlying logical decoding stream, but it
might be a bit fiddly and complex for your needs.

Ideally we'd be able to fire triggers in BDR, but that's not
implemented or on the current roadmap and there's no funded work on it
at this point. There's some work to support it in pglogical though.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Güttler 2017-05-03 10:57:47 Caching and Blobs in PG? Was: Can PG replace redis, amqp, s3 in the future?
Previous Message Tom Lane 2017-05-02 22:26:19 Re: Implicit typecasting to numeric in psql