Thread: Triggers on replicated (BDR) data

Triggers on replicated (BDR) data

From
Daniel Smedegaard Buus
Date:
Hey there :)

These days are my first ones with postgres, and I must say I'm impressed!

I'm setting up a BDR group and I was trying to use triggers to automatically configure the HBA on existing nodes when a new node joins or an old one leaves. Basically, its a triggered perl function calling an external shell script.

When a node joins, the trigger works great on the node that the newcomer talks to, but on other nodes, the trigger ("AFTER INSERT ON bdr.bdr_nodes") is never activated.

Assuming that the data in bdr.bdr_nodes is replicated rather than INSERTed, I guess this behavior sort of makes sense... But I'm hoping there's some way to either change the behavior, or perhaps something else that I can attach a trigger to?

Anyone ideas?

Cheers,
Daniel :)