postgres/src
Tom Lane d4fa18a551 Avoid testing tuple visibility without buffer lock in RI_FKey_check().
Despite the argumentation I wrote in commit 7a2fe85b0, it's unsafe to do
this, because in corner cases it's possible for HeapTupleSatisfiesSelf
to try to set hint bits on the target tuple; and at least since 8.2 we
have required the buffer content lock to be held while setting hint bits.

The added regression test exercises one such corner case.  Unpatched, it
causes an assertion failure in assert-enabled builds, or otherwise would
cause a hint bit change in a buffer we don't hold lock on, which given
the right race condition could result in checksum failures or other data
consistency problems.  The odds of a problem in the field are probably
pretty small, but nonetheless back-patch to all supported branches.

Report: <19391.1477244876@sss.pgh.pa.us>
2016-10-23 15:01:24 -04:00
..
backend Avoid testing tuple visibility without buffer lock in RI_FKey_check(). 2016-10-23 15:01:24 -04:00
bin Include <sys/select.h> where needed 2016-09-27 01:05:21 -03:00
include Fix improper repetition of previous results from a hashed aggregate. 2016-08-24 14:37:51 -04:00
interfaces In PQsendQueryStart(), avoid leaking any left-over async result. 2016-10-10 10:35:58 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:14:01 -05:00
pl Make pltcl regression tests safe for Danish locale. 2016-07-21 14:24:07 -04:00
port Include <sys/select.h> where needed 2016-09-27 01:05:21 -03:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:02:23 -04:00
test Avoid testing tuple visibility without buffer lock in RI_FKey_check(). 2016-10-23 15:01:24 -04:00
timezone Sync our copy of the timezone library with IANA release tzcode2016h. 2016-10-20 15:40:34 -04:00
tools Remove vestigial references to "zic" in favor of "IANA database". 2016-09-04 19:42:54 -04:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:26 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make numeric form of PG version number readily available in Makefiles. 2015-07-05 12:01:01 -04:00
Makefile.shlib Make the AIX case of Makefile.shlib safe for parallel make. 2016-07-23 20:30:59 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00