aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-10-23 19:14:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-10-23 19:14:32 -0400
commit8f1fb7d621b0e6bd2eb0ba2ac9634c5b5a03564b (patch)
tree5303890feaf33de8b68b24add6d6c9d5820b6dd0 /src/backend/access/transam/commit_ts.c
parenta6c0a5b6e8a9498540c6a7bb1b6d68958acc9bc6 (diff)
downloadpostgresql-8f1fb7d621b0e6bd2eb0ba2ac9634c5b5a03564b.tar.gz
postgresql-8f1fb7d621b0e6bd2eb0ba2ac9634c5b5a03564b.zip
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>
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions