• Tom Lane's avatar
    Correct nasty error in heap_update: it was releasing the buffer refcount · a4ddbbd1
    Tom Lane authored
    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.)
    a4ddbbd1
heapam.c 68.5 KB