BDR - triggers on receiving node? - Mailing list pgsql-general

From Peter Mogensen
Subject BDR - triggers on receiving node?
Date
Msg-id 551298B8.1010902@one.com
Whole thread Raw
Responses Re: BDR - triggers on receiving node?  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-general
Hi,

Traditionally it hadn't made much sense to fire a trigger on a receiving
replica node (slave) - for many reasons, including it being read-only.

But with BDRs multi parter, partial replication and the possibility that
some tables are either actually or logically local to a single node,
there's scenarios where this makes sense.

Is it possible?

Say ... I have a table in a BDR replicated database with an "ON UPDATE"
trigger. - and that trigger wants to locally find out the local
txid_snapshot_xmin() when a change was applied to the local node.
Not the upstream txid of the transaction which actually made the change
originally (which only makes sense on that node) - but on the local node
receiving the change via BDR LLSR.

Can that be done?

/Peter



pgsql-general by date:

Previous
From: Rebecca Clarke
Date:
Subject: Could not read block of temporary files
Next
From: Craig Ringer
Date:
Subject: Re: BDR - triggers on receiving node?