v12-0017-bufmgr-Fix-use-of-wrong-variable-in-GetPrivateRe.patch
application/octet-stream
Filename: v12-0017-bufmgr-Fix-use-of-wrong-variable-in-GetPrivateRe.patch
Type: application/octet-stream
Part: 6
Message:
Re: index prefetching
Patch
Format: format-patch
Series: patch v12-0017
Subject: bufmgr: Fix use of wrong variable in GetPrivateRefCountEntrySlow()
| File | + | − |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | 1 | 1 |
From f1425b878c119d90909009a1ca97a5ba89565e65 Mon Sep 17 00:00:00 2001 From: Andres Freund <andres@anarazel.de> Date: Tue, 3 Mar 2026 16:52:24 -0500 Subject: [PATCH v12 17/23] bufmgr: Fix use of wrong variable in GetPrivateRefCountEntrySlow() Unfortunately I made GetPrivateRefCountEntrySlow() set a wrong cache hint when moving entries from the hash table to the faster array. There are no correctness concerns due to this, just an unnecessary loss of performance. Author: Reviewed-by: Discussion: https://postgr.es/m/ Backpatch: --- src/backend/storage/buffer/bufmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 0de3ee932..a4a3e024b 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -503,7 +503,7 @@ GetPrivateRefCountEntrySlow(Buffer buffer, bool do_move) free->data = data; PrivateRefCountArrayKeys[ReservedRefCountSlot] = buffer; /* update cache for the next lookup */ - PrivateRefCountEntryLast = match; + PrivateRefCountEntryLast = ReservedRefCountSlot; ReservedRefCountSlot = -1; -- 2.53.0