From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | hlinnaka <hlinnaka(at)iki(dot)fi> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Moving ExecInsertIndexTuples and friends to new file |
Date: | 2015-04-24 18:26:15 |
Message-ID: | CAM3SWZQN2M4nRSLm=0ic3nqK9dN3iSXResWH6sZSu5-PYgT5LQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 24, 2015 at 6:38 AM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> I wrote a little overview text on how unique and exclusion constraints are
> enforced. Most of the information can be gleaned from comments elsewhere,
> but I think it's helpful to have it in one place. Makes it easier to compare
> how unique and exclusion constraints work. The harmless deadlocks with
> exclusion constraints are not explained elsewhere AFAICS.
FWIW, both Jeff Davis and Tom Lane were well aware of this issue back
when exclusion constraints went in - it was judged to be acceptable at
the time, which I agree with. I happened to discuss this with Jeff in
New York recently. I agree that it should definitely be documented
like this (and the fact that ordinary unique indexes are unaffected,
too).
> This is also in preparation for Peter's INSERT ON CONFLICT patch. That will
> add another section explaining how the deadlocks and livelocks are avoided.
> That's easier to understand after you grok the potential for deadlocks with
> exclusion constraints.
Makes sense.
> This also removes a comment from 1989 claiming that the code should be moved
> elsewhere. I think the code is in the right place.
+1
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2015-04-24 18:40:58 | Re: Proposal: knowing detail of config files via SQL |
Previous Message | Pavel Stehule | 2015-04-24 17:47:48 | Re: PL/pgSQL, RAISE and error context |