pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
fix comment for MAX_SIMUL_LWLOCKS
3+ messages / 2 participants
[nested] [flat]

* fix comment for MAX_SIMUL_LWLOCKS
@ 2025-08-19 21:34  Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Nathan Bossart @ 2025-08-19 21:34 UTC (permalink / raw)
  To: pgsql-hackers

This comment mentions that pg_buffercache locks all buffer partitions
simultaneously, but it hasn't done so since v10 (see commit 6e654546fb).

-- 
nathan
From 68b81e3bf70d5da0a0e2d0a0087218df7fde1101 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <nathan@postgresql.org>
Date: Tue, 19 Aug 2025 16:27:33 -0500
Subject: [PATCH v1 1/1] Fix comment for MAX_SIMUL_LWLOCKS.

This comment mentions that pg_buffercache locks all buffer
partitions simultaneously, but it hasn't done so since v10.

Oversight in commit 6e654546fb.
---
 src/backend/storage/lmgr/lwlock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index ec9c345ffdf..c80b43f1f55 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -162,8 +162,7 @@ LWLockPadded *MainLWLockArray = NULL;
 /*
  * We use this structure to keep track of locked LWLocks for release
  * during error recovery.  Normally, only a few will be held at once, but
- * occasionally the number can be much higher; for example, the pg_buffercache
- * extension locks all buffer partitions simultaneously.
+ * occasionally the number can be much higher.
  */
 #define MAX_SIMUL_LWLOCKS	200
 
-- 
2.39.5 (Apple Git-154)

Attachments:

  [text/plain] v1-0001-Fix-comment-for-MAX_SIMUL_LWLOCKS.patch (1.1K, ../../aKTuAHVEuYCUmmIy@nathan/2-v1-0001-Fix-comment-for-MAX_SIMUL_LWLOCKS.patch)
  download | inline diff:
From 68b81e3bf70d5da0a0e2d0a0087218df7fde1101 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <nathan@postgresql.org>
Date: Tue, 19 Aug 2025 16:27:33 -0500
Subject: [PATCH v1 1/1] Fix comment for MAX_SIMUL_LWLOCKS.

This comment mentions that pg_buffercache locks all buffer
partitions simultaneously, but it hasn't done so since v10.

Oversight in commit 6e654546fb.
---
 src/backend/storage/lmgr/lwlock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index ec9c345ffdf..c80b43f1f55 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -162,8 +162,7 @@ LWLockPadded *MainLWLockArray = NULL;
 /*
  * We use this structure to keep track of locked LWLocks for release
  * during error recovery.  Normally, only a few will be held at once, but
- * occasionally the number can be much higher; for example, the pg_buffercache
- * extension locks all buffer partitions simultaneously.
+ * occasionally the number can be much higher.
  */
 #define MAX_SIMUL_LWLOCKS	200
 
-- 
2.39.5 (Apple Git-154)

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: fix comment for MAX_SIMUL_LWLOCKS
@ 2025-08-19 21:40  Andres Freund <andres@anarazel.de>
  parent: Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Andres Freund @ 2025-08-19 21:40 UTC (permalink / raw)
  To: Nathan Bossart <nathandbossart@gmail.com>; +Cc: pgsql-hackers

Hi,

On 2025-08-19 16:34:56 -0500, Nathan Bossart wrote:
> From 68b81e3bf70d5da0a0e2d0a0087218df7fde1101 Mon Sep 17 00:00:00 2001
> From: Nathan Bossart <nathan@postgresql.org>
> Date: Tue, 19 Aug 2025 16:27:33 -0500
> Subject: [PATCH v1 1/1] Fix comment for MAX_SIMUL_LWLOCKS.
> 
> This comment mentions that pg_buffercache locks all buffer
> partitions simultaneously, but it hasn't done so since v10.
> 
> Oversight in commit 6e654546fb.

LGTM





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: fix comment for MAX_SIMUL_LWLOCKS
@ 2025-08-19 21:49  Nathan Bossart <nathandbossart@gmail.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Nathan Bossart @ 2025-08-19 21:49 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-hackers

On Tue, Aug 19, 2025 at 05:40:23PM -0400, Andres Freund wrote:
> LGTM

Thanks, committed.

-- 
nathan





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-08-19 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 21:34 fix comment for MAX_SIMUL_LWLOCKS Nathan Bossart <nathandbossart@gmail.com>
2025-08-19 21:40 ` Andres Freund <andres@anarazel.de>
2025-08-19 21:49   ` Nathan Bossart <nathandbossart@gmail.com>

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