From 8171ed0a87d998bd07dad6700bee0938b9fa49d9 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 1 Sep 2025 11:16:01 +0800 Subject: [PATCH] Update outdated references to SLRU ControlLock Oversight in 53c2a97a9266 which removed the single ControlLock and added the bank control locks. --- src/backend/access/transam/slru.c | 8 ++++---- src/include/access/slru.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 10ec259f382..f78e35d66d5 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -401,9 +401,9 @@ SimpleLruZeroPage(SlruCtl ctl, int64 pageno) * Assume this page is now the latest active page. * * Note that because both this routine and SlruSelectLRUPage run with - * ControlLock held, it is not possible for this to be zeroing a page that - * SlruSelectLRUPage is going to evict simultaneously. Therefore, there's - * no memory barrier here. + * bank control lock held, it is not possible for this to be zeroing a + * page that SlruSelectLRUPage is going to evict simultaneously. + * Therefore, there's no memory barrier here. */ pg_atomic_write_u64(&shared->latest_page_number, pageno); @@ -437,7 +437,7 @@ SimpleLruZeroLSNs(SlruCtl ctl, int slotno) * This is a convenience wrapper for the common case of zeroing a page and * immediately flushing it to disk. * - * Control lock is acquired and released here. + * Bank control lock is acquired and released here. */ void SimpleLruZeroAndWritePage(SlruCtl ctl, int64 pageno) diff --git a/src/include/access/slru.h b/src/include/access/slru.h index 20dbd1e0070..0b81bc62639 100644 --- a/src/include/access/slru.h +++ b/src/include/access/slru.h @@ -55,7 +55,7 @@ typedef enum /* * Shared-memory state * - * ControlLock is used to protect access to the other fields, except + * Bank control locks are used to protect access to the other fields, except * latest_page_number, which uses atomics; see comment in slru.c. */ typedef struct SlruSharedData -- 2.51.0