On Thu, Mar 06, 2014 at 04:47:48PM -0800, Chris Keane wrote: > 1. All triggers, both application and bucardo, get a snippet at the top to > check if session_user = bucardo and if yes, immediately return. This is a > way poor man's way to stop triggers firing on bucardo-related updates.
That will stop the user-defined triggers, but not the foreign keys. Which could stop you dead in the water, because it can lead to consistency errors. You may be able to work around this in the app by updating very carefully, but it's pretty risky. Will also be a lot slower. > 2. I somehow need to set an update order on goats so that foreign-key > constrained fields get updated in the right order. I notice that herdmap > has a field 'priority' and find_goats() uses it to return a list of goats > in priority order. If I massaged the priority field so that source table > fields get updated before foreign key reference tables, and assuming some > related data gets inserted into a few tables, would the replication happen > in herdmap.priority order? Ah, there you go, I should have read this first. :) Yes, I think that will work. Should be easy enough to test out. Note that the caveat about slowness still applies. -- Greg Sabino Mullane [email protected] End Point Corporation PGP Key: 0x14964AC8
signature.asc
Description: Digital signature
_______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
