Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uuLbK-007NAP-05 for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 01:50:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uuLbJ-003oIt-1a for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Sep 2025 01:50:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uuLY5-003jax-Me for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 01:47:34 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uuLY2-000dFZ-13 for pgsql-hackers@lists.postgresql.org; Fri, 05 Sep 2025 01:47:33 +0000 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-b4c738ee2fbso1256446a12.3 for ; Thu, 04 Sep 2025 18:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757036849; x=1757641649; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7UKuMKTbhQ1qJKYF3cn9b2Pr14g0PnLx2O8ULG6DWj8=; b=MqAxSqcbaVk8YblCcIx8IUpV57XODpBfQXy8mZGfxtRtJ0XHL+QQ+4D2afV2AzDYbv NbE4BVE0gdoNx0vd07Lrlyj1gtGDNJEgjWVU6u1CSBAlan47xQSFZABgZxcoFdp4uGHW 5IxJ9LCz3EntPDBEX2FRC6SO5621hxL4CvgZFGOly2De9SjGa13DkP/aD/TpNhlgs8PQ uhCiiHS9xvd9RNhbLPDcogysSE17k554STe0C+6K54yr2t+X4GlVSx/msSivR7ga6A54 lwGv1D1BdisETrqiX5XYUXSX1iZg9GW8G1yPbSYzcTOYQWcCaC5VhiuUWO6FIcSaNJTw RLug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757036849; x=1757641649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7UKuMKTbhQ1qJKYF3cn9b2Pr14g0PnLx2O8ULG6DWj8=; b=DPTxrLogwHhUYc1MHDMEPsYK4cvZm4L9QBMExIU3CKNCeY4oLaT8qCTnNAHp2Purk5 oau1G/Kp07K7qP/qOsYUOfBhnp70FC979UpelYFWVhlQCiBUKaHomT6cRDmdpjhyKqWN jXmPAj50GwsqBxO4eVQ5sBqRVIiCm+cfrtNhz7EMXOvTu4L1o0szVKKz5a2VW/NivVfD x4NowbrF9ffn7WZRtheZJ4VzHrd93i6Whx6tS7Thv0S9NBnu32LqDI1m9FGy+mgPdAJJ N7Jsk1bemZ7RXJe4GQMuN45MA4P0ryrMdda06lzMGisbKps5Nwb347UggMmasmt6oJ99 yaKw== X-Gm-Message-State: AOJu0YyaOJ4ZxCkr48D9+fjs5AXQzn/+jtDnSApShj+DlW11PuY8aQYZ UkXQ1mzOiBRQ/4oWMkfVZOShGDtEwQZJnjIInW21I8n0fdSiVYUuQM6N X-Gm-Gg: ASbGncssOa2t6IDhvVMT7clq28Ol9KZtC6rUCHR+wcuFRQDMMW9V8jEnZpUJzKt4cW0 vq4MM4c4neBhuQm/TQVXuqSTn4JrVHfI0xyAH99D1Qtp5e9nq+ri5KBhbdGO5JLSPRCarXgj93g muTkyWusLlTUuTm3h9cwE+BiUgdlRT22GrZRb/42gOSSYZItcWuk1xDirbi0I8IVSlAeRhqMIAz M1eJX6m8o0ICivECd6le1ytQmruzZew4zCHhzi+WCNIsCf7iIoFQ21NJKmtPLzKWGcpmulvrW08 PizsN/I29nSEVu0m1Tq2SvYVraUW3SKkiEay79NkKsOfOo9vDCSdzTPmiCVcc0ZwBbpozB/gVUR 2eEBhSc47wZwm0Iw= X-Google-Smtp-Source: AGHT+IFw0GKiWCoNtxTPrMV+v0imfrfcoBhxWOkOO/8Z//cxcYluDDsmzfZtyeHdLWFDjRSp51fxFQ== X-Received: by 2002:a17:903:2c06:b0:246:cfc5:1b61 with SMTP id d9443c01a7336-24944b15b97mr274927965ad.55.1757036848892; Thu, 04 Sep 2025 18:47:28 -0700 (PDT) Received: from jrouhaud ([115.43.41.38]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-24ced566602sm9275695ad.126.2025.09.04.18.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Sep 2025 18:47:27 -0700 (PDT) Date: Fri, 5 Sep 2025 09:47:24 +0800 From: Julien Rouhaud To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Update outdated references to SLRU ControlLock Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CHu9GwQZ59mEyiow" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --CHu9GwQZ59mEyiow Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --CHu9GwQZ59mEyiow Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=0001-Fix-a-few-outdated-SLRU-comments.patch From 392e74d26fdab34d1c3ed87cca58f06c92754d0b Mon Sep 17 00:00:00 2001 From: Julien Rouhaud 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.c index 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 --CHu9GwQZ59mEyiow--