On 01/18/2015 04:48 AM, Peter Geoghegan wrote:
> I think that the fundamental, unfixable race condition here is the
> disconnect between index tuple insertion and checking for would-be
> exclusion violations that exclusion constraints naturally have here,
> that unique indexes naturally don't have [1] (note that I'm talking
> only about approach #2 to value locking here; approach #1 isn't in
> V2.0). I suspect that the feature is not technically feasible to make
> work correctly with exclusion constraints, end of story. VACUUM
> interlocking is probably also involved here, but the unfixable race
> condition seems like our fundamental problem.
It's not a fundamental, unfixable race condition. In [1], I gave you
three ideas straight off the top of my head on how that could be fixed.
> Please work with me towards a committable patch.
I'm trying...
> [1] http://www.postgresql.org/message-id/54A7C76D.3070101@vmware.com
- Heikki