]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Update outdated references to the SLRU ControlLock
authorMichael Paquier <michael@paquier.xyz>
Wed, 3 Sep 2025 01:20:33 +0000 (10:20 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 3 Sep 2025 01:20:33 +0000 (10:20 +0900)
SLRU bank locks are referred as "bank locks" or "SLRU bank locks" in the
code comments.  The comments updated in this commit use the latter term.

Oversight in 53c2a97a9266, that has replaced the single ControlLock by
the bank control locks.

Author: Julien Rouhaud <julien.rouhaud@free.fr>
Discussion: https://postgr.es/m/aLUT2UO8RjJOzZNq@jrouhaud
Backpatch-through: 17

src/backend/access/transam/slru.c
src/include/access/slru.h

index fe56286d9a972a26a99ef1f776d145b0cdb5bbaf..bcc6adb4d295ef7e89a02a9a3ee77494be42bb0a 100644 (file)
@@ -400,10 +400,10 @@ 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.
+        * Note that because both this routine and SlruSelectLRUPage run with a
+        * SLRU bank 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);
 
index e142800aab216cd67bf0363ece8dadc9c7d5df73..d5ca3447208155d00d497fbc40fdc2a960a58882 100644 (file)
@@ -55,7 +55,7 @@ typedef enum
 /*
  * Shared-memory state
  *
- * ControlLock is used to protect access to the other fields, except
+ * SLRU bank 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