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 <[EMAIL PROTECTED]> 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)==statement2(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 | [EMAIL PROTECTED]
The very definition of "news" is "something that hardly ever happens."
--Bruce Schneier
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general