postgresql/src
Tom Lane 8f1fb7d621 Avoid testing tuple visibility without buffer lock.
INSERT ... ON CONFLICT (specifically ExecCheckHeapTupleVisible) contains
another example of this unsafe coding practice.  It is much harder to get
a failure out of it than the case fixed in commit 6292c2339, because in
most scenarios any hint bits that could be set would have already been set
earlier in the command.  However, Konstantin Knizhnik reported a failure
with a custom transaction manager, and it's clearly possible to get a
failure via a race condition in async-commit mode.

For lack of a reproducible example, no regression test case in this
commit.

I did some testing with Asserts added to tqual.c's functions, and can say
that running "make check-world" exposed these two bugs and no others.
The Asserts are messy enough that I've not added them to the code for now.

Report: <57EE93C8.8080504@postgrespro.ru>
Related-Discussion: <CAO3NbwOycQjt2Oqy2VW-eLTq2M5uGMyHnGm=RNga4mjqcYD7gQ@mail.gmail.com>
2016-10-23 19:14:32 -04:00
..
backend Avoid testing tuple visibility without buffer lock. 2016-10-23 19:14:32 -04:00
bin Rename walmethod fsync method to sync 2016-10-23 18:04:34 +02:00
common Rename "pg_xlog" directory to "pg_wal". 2016-10-20 11:32:18 -04:00
fe_utils Teach appendShellString() to not quote strings containing "-". 2016-09-06 14:53:31 -04:00
include Allow pg_basebackup to stream transaction log in tar mode 2016-10-23 15:23:11 +02:00
interfaces Remove a comment which is now incorrect. 2016-10-20 10:24:51 -04:00
makefiles Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
pl Fix further hash table order dependent tests. 2016-10-12 18:31:45 -07:00
port Allow pg_basebackup to stream transaction log in tar mode 2016-10-23 15:23:11 +02:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Don't throw serialization errors for self-conflicts in INSERT ON CONFLICT. 2016-10-23 18:36:13 -04:00
timezone Sync our copy of the timezone library with IANA release tzcode2016h. 2016-10-20 15:40:07 -04:00
tools Revert "Replace PostmasterRandom() with a stronger way of generating randomness." 2016-10-18 16:28:23 +03:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
Makefile.shlib Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
nls-global.mk
win32.mak