Re: Question about RI checks - Mailing list pgsql-hackers

From Nick Barnes
Subject Re: Question about RI checks
Date
Msg-id CAG+WGGk5thyh-MQ7T3H4bUBz+tSQpR+kZ==ex0+cmAposKbFmA@mail.gmail.com
Whole thread Raw
In response to Re: Question about RI checks  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
Thanks! I've been mulling this over for weeks; nice to know it wasn't just staring me in the face...

So in conclusion, the lock avoids raising constraint violation errors in
a few cases in READ COMMITTED mode. In REPEATABLE READ mode, it converts some
constraint violation errors into serialization failures. Or at least that's
how it looks to me.

Yeah, it had occurred to me that this is one place you might see some benefit. But waiting around on a potentially irrelevant update, just in case the RI violation resolves itself, didn't really sound like a net win. Not to mention the possibility of a deadlock, if the other transaction updates our PK or adds another reference to it.
 
Thanks again,
Nick Barnes

pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Question about RI checks
Next
From: Tom Lane
Date:
Subject: Getting rid of "accept incoming network connections" prompts on OS X