Vivek Khera vivek at khera.org
Mon Dec 10 11:31:28 PST 2007
On Dec 6, 2007, at 3:48 PM, Jeff Trout wrote:

> In one case we have a table that as a foreign key w/ondelete cascade  
> into the replicated table. This works fine - inserting a row into  
> the table fails if the key isn't there.  The problem is if data is  
> deleted from the replicated table, it seems the ON DELETE CASCADE  
> part is never done, and I'm left with orphaned nodes in my other  
> tables.

If all of your tables are replicated by slony, it will take care of  
performing the individual deletes on the cascaded tables for you on  
the replicated nodes.

There must be some other problem you have because slony will do the  
right thing here.

Looking at your examples, you must have it such that one of your  
tables is not replicated by slony because you are inserting into it on  
the replica.  This won't work because you're expecting the DB to do  
consistency, but you've told slony it owns the table, so it disables  
the DB from doing consistency checks which are redundant.

Your use case doesn't work with slony.



More information about the Slony1-general mailing list