Re: Disable and enable of table and column constraints - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Disable and enable of table and column constraints
Date
Msg-id 4AAE0D2A020000250002AECC@gw.wicourts.gov
Whole thread Raw
In response to Re: Disable and enable of table and column constraints  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
>Martijn van Oosterhout <kleptog@svana.org> wrote:
> FWIW, I find the ability in Slony to configure triggers so they work
> or not depending on the replication role to be extremely useful.
> Absolutely a major positive feature.
Yeah, as a general rule it doesn't make sense to try to enforce
constraints on a replication *target*.  Check and report, perhaps, but
you don't normally want to error out on anything which you know was
actually applied to the source database.  It's even worse for some
classes of triggers which generate derived data; you don't want the
replication to generate one value and then a trigger on the
replication target to try to do the same.  A count, for example, could
easily wind up with an "off by one" error much of the time.
-Kevin


pgsql-hackers by date:

Previous
From: Pierre Frédéric Caillaud
Date:
Subject: Bulk Inserts
Next
From: Jeff Janes
Date:
Subject: Re: Patch LWlocks instrumentation