Geoffrey lists at serioustechnology.com
Mon Jun 9 07:38:50 PDT 2008
Andrew Sullivan wrote:
> 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.

That's exactly what we want to do.

>> 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?)

This will only happen on the master node, so Slony won't be preventing 
insertions there.

I might have confused folks as I've been posting about two different 
issues.  The main issue on the master node is that we need to make sure 
that the Slony triggers fire when we disable OUR triggers.

The issue on the slave is that we want to be able to add triggers that 
send data to another system, a non-slony system.

My apologies for mixing the two threads.

-- 
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin


More information about the Slony1-general mailing list