aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/buffer/localbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 5a195c0d596..1be4f4f8daf 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -380,7 +380,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
hash_search(LocalBufHash, (void *) &tag, HASH_ENTER, &found);
if (found)
{
- BufferDesc *existing_hdr = GetLocalBufferDescriptor(hresult->id);
+ BufferDesc *existing_hdr;
uint32 buf_state;
UnpinLocalBuffer(BufferDescriptorGetBuffer(victim_buf_hdr));
@@ -392,7 +392,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
buf_state = pg_atomic_read_u32(&existing_hdr->state);
Assert(buf_state & BM_TAG_VALID);
Assert(!(buf_state & BM_DIRTY));
- buf_state &= BM_VALID;
+ buf_state &= ~BM_VALID;
pg_atomic_unlocked_write_u32(&existing_hdr->state, buf_state);
}
else