]> granicus.if.org Git - postgresql/commit
Correct nasty error in heap_update: it was releasing the buffer refcount
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2001 22:14:31 +0000 (22:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2001 22:14:31 +0000 (22:14 +0000)
commita4ddbbd1a4d277e2e6d65abce320b6a1dd944c14
tree935a7ed46955ab4e754809f6239de865c4f9f8ce
parent542b7c644534ee3e555573de77cde8a79a9e9a0e
Correct nasty error in heap_update: it was releasing the buffer refcount
before calling RelationInvalidateHeapTuple(), which is bad because the
latter needs to look at the tuple data, which is in the shared disk
buffer.  If another backend manages to recycle the buffer while this
is going on, we will compute the wrong hashindex for the tuple or
maybe even crash outright.  Must hold buffer refcount until afterwards.
(This bug is not in 7.0.*; seems to be have introduced during WAL changes.)
src/backend/access/heap/heapam.c