From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Update outdated references to SLRU ControlLock
Date: Fri, 5 Sep 2025 09:47:24 +0800
Message-ID: <aLpBLMOYwEQkaleF@jrouhaud> (raw)
In-Reply-To: <aLembYNy92oO9dhL@jrouhaud>
References: <aLUT2UO8RjJOzZNq@jrouhaud>
<aLUptKkboud-OZAw@paquier.xyz>
<aLUs7ap5paM8Vq9C@jrouhaud>
<aLeYMo_c2yWRxmSO@paquier.xyz>
<aLembYNy92oO9dhL@jrouhaud>
Hi,
On Wed, Sep 03, 2025 at 10:22:37AM +0800, Julien Rouhaud wrote:
> On Wed, Sep 03, 2025 at 10:21:54AM +0900, Michael Paquier wrote:
> > Okay, I have used "SLRU bank lock" and backpatched that down to v17
> > where it matters.
I caught a couple of other minor outdated things in the comments when finishing
rebasing my own work:
- long_segment_names has been added to SimpleLruInit
- SlruRecentlyUsed is not a macro anymore
Simple patch attached.
Attachments:0001-Fix-a-few-outdated-SLRU-comments.patch (text/plain, 1.4K) download
From 392e74d26fdab34d1c3ed87cca58f06c92754d0b Mon Sep 17 00:00:00 2001
From: Julien Rouhaud <julien.rouhaud@free.fr>
Date: Fri, 5 Sep 2025 09:04:58 +0800
Subject: [PATCH] Fix a few outdated SLRU comments
long_segment_names has been added to SimpleLruInit, and SlruRecentlyUsed is now
a (static inline) function.
---
src/backend/access/transam/slru.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.cindex f78e35d66d5..7ef52a6da0f 100644--- a/src/backend/access/transam/slru.c+++ b/src/backend/access/transam/slru.c@@ -246,6 +246,7 @@ SimpleLruAutotuneBuffers(int divisor, int max)
* buffer_tranche_id: tranche ID to use for the SLRU's per-buffer LWLocks.
* bank_tranche_id: tranche ID to use for the bank LWLocks.
* sync_handler: which set of functions to use to handle sync requests
+ * long_segment_names: use short or long segment names
*/
void
SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns,
@@ -644,7 +645,7 @@ SimpleLruReadPage_ReadOnly(SlruCtl ctl, int64 pageno, TransactionId xid)
shared->page_number[slotno] == pageno &&
shared->page_status[slotno] != SLRU_PAGE_READ_IN_PROGRESS)
{
- /* See comments for SlruRecentlyUsed macro */+ /* See comments for SlruRecentlyUsed() */
SlruRecentlyUsed(shared, slotno);
/* update the stats counter of pages found in the SLRU */
--
2.51.0
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: rjuju123@gmail.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: Update outdated references to SLRU ControlLock
In-Reply-To: <aLpBLMOYwEQkaleF@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox