postgresql/src
Alvaro Herrera eeab936ba9 Fix FOR UPDATE NOWAIT on updated tuple chains
If SELECT FOR UPDATE NOWAIT tries to lock a tuple that is concurrently
being updated, it might fail to honor its NOWAIT specification and block
instead of raising an error.

Fix by adding a no-wait flag to EvalPlanQualFetch which it can pass down
to heap_lock_tuple; also use it in EvalPlanQualFetch itself to avoid
blocking while waiting for a concurrent transaction.

Authors: Craig Ringer and Thomas Munro, tweaked by Álvaro
http://www.postgresql.org/message-id/51FB6703.9090801@2ndquadrant.com

Per Thomas Munro in the course of his SKIP LOCKED feature submission,
who also provided one of the isolation test specs.

Backpatch to 9.4, because that's as far back as it applies without
conflicts (although the bug goes all the way back).  To that branch also
backpatch Thomas Munro's new NOWAIT test cases, committed in master by
Heikki as commit 9ee16b49f0 .
2014-08-27 19:15:18 -04:00
..
backend Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
bin doc: Improve pg_restore help output 2014-08-23 00:23:34 -04:00
common Small message fixes 2014-08-09 00:07:29 -04:00
include Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
interfaces Install libpq DLL with $(INSTALL_SHLIB). 2014-08-18 23:00:57 -04:00
makefiles Flush a stray definition of $(DLLTOOL). 2014-02-11 12:59:48 -05:00
pl Small message fixes 2014-08-09 00:07:29 -04:00
port Report success when Windows kill() emulation signals an exiting process. 2014-07-23 00:36:40 -04:00
template Revert to using --enable-auto-import in Cygwin builds. 2014-02-16 15:14:04 -05:00
test Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
timezone Reject out-of-range numeric timezone specifications. 2014-07-21 22:41:23 -04:00
tools Rework 'MOVE ALL' to 'ALTER .. ALL IN TABLESPACE' 2014-08-21 19:12:00 -04:00
tutorial pgindent run for 9.4 2014-05-06 12:12:18 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Set shared library path for in-tree TAP tests 2014-08-15 00:02:44 -04:00
Makefile.shlib Tweak position of $(DLL_DEFFILE) in shared-library link commands. 2014-02-12 11:22:23 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00