Thu Jul 19 00:56:19 PDT 2007
- Previous message: [Slony1-general] Replication and deferrable constraints
- Next message: [Slony1-general] Replication and deferrable constraints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Foreign keys are disabled on the replica That was a key phrase! Thanks! So, is foreign keys are disabled on replicas, the answer is "YES, deferred constraints are okay". In my case - it is a foreign key referenced to the same table (tbl). But hos Slony disables foreign keys constraints if corresponding triggers are enabled on replicas? I watched trigger states using phpPgAdmin, they are all turned on. Possibly using a blocking slony trigger which it adds to all tables at the beginning of the trigger sequence? I haven't know if such trigger blocks internal foreign key constraint trigger too... On 7/18/07, Andrew Sullivan <ajs at crankycanuck.ca> wrote: > > On Wed, Jul 18, 2007 at 11:06:44PM +0400, Dmitry Koterov wrote: > > Sorry, but I have not undersand this clearly. :-( > > Could you please answer the single practical question (just "yes" or > "no"): > > if I perform > > > > BEGIN; > > INSERT INTO tbl(id, parent_id) VALUES(1, 2); -- child first! > > INSERT INTO tbl(id, parent_id) VALUES(2, null); -- parent > > COMMIT; > > > > on master (assuming that parent_id foreign key is deferrable), DOES > Slony > > GUARANTEE that ANY subscriber will receive and SUCESSFULLY process this > > data, or there is a probability that a subscriber will fail to update? > > Yes, but I'm not sure whether in your example > statement1(tbl)=3D=3Dstatement2(tbl). > > Foreign keys are disabled on the replica on the grounds that they're > enforced on the origin anyway. But your case isn't a foreign key, > AFAICT, because the tables are the same one in each statement as I > read it. > > A > > -- > Andrew Sullivan | ajs at crankycanuck.ca > The very definition of "news" is "something that hardly ever happens." > --Bruce Schneier > _______________________________________________ > Slony1-general mailing list > Slony1-general at lists.slony.info > http://lists.slony.info/mailman/listinfo/slony1-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070719/= 77ad457b/attachment.htm
- Previous message: [Slony1-general] Replication and deferrable constraints
- Next message: [Slony1-general] Replication and deferrable constraints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list