Andrew Sullivan ajs at crankycanuck.ca
Mon Jun 9 06:35:15 PDT 2008
On Thu, Jun 05, 2008 at 04:58:48PM -0400, Geoffrey wrote:
> I have a better understanding as to how this whole process is supposed
> to work, thus I want to present it here to make sure it will work.
> 
> We intend to execute the following on all slony triggers:
> 
> ALTER TABLE foo ENABLE ALWAYS TRIGGER bar;
> 
> Assuming this will cause the slony triggers to fire when we do the 
> following to disable our triggers:
> 
> SET session_replication_role TO 'replica';

If I read that right, what you want is the Slony triggers to keep working
and none of the others to do.  Is that right?  If so, that ought to work. 
It's certainly the way the mechanism is designed.  

> User creates a record that must be distributed across all the databases. 
>  There is a trigger that recognizes this occurence and therefore 
> generates a record in another database that will be eventually 
> distributed to the other databases.  There is a process that reads these 
> records and then distributes them.  The problem is we need to make sure 
> that when this process distributes them to the other databases, new 
> records are not created to redistribute these records.

You're also going to run into the "prevent insertions not by Slony" trigger
here, no?  (Or have you allowed for that?)

A



More information about the Slony1-general mailing list