pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix checkpointer shared memory allocation 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 11:59 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 11:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/466c5435fd45209546c502bd1e8ee5b76b1cc0a1 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 11:59 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 11:59 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5cfbff48a4fdd1437ff06fcebdc2dade477ed4b8 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 12:00 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 12:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c5d66fc12b0891fd5f2a830ab9fa9feb8df94171 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 12:00 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 12:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/73f897ba5836c1341bec460c618ac76264d986c8 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 12:00 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 12:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2ac50f1187c2007f6ed581db6ee7240c5e5a37e6 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 12:00 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 12:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6058900348059255a8a8da6df46ff8606ca1c612 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix checkpointer shared memory allocation @ 2025-08-07 12:00 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 7+ messages in thread From: Alexander Korotkov @ 2025-08-07 12:00 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix checkpointer shared memory allocation Use Min(NBuffers, MAX_CHECKPOINT_REQUESTS) instead of NBuffers in CheckpointerShmemSize() to match the actual array size limit set in CheckpointerShmemInit(). This prevents wasting shared memory when NBuffers > MAX_CHECKPOINT_REQUESTS. Also, fix the comment. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/1439188.1754506714%40sss.pgh.pa.us Author: Xuneng Zhou <xunengzhou@gmail.com> Co-authored-by: Alexander Korotkov <aekorotkov@gmail.com> Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7f872ae7020e6772ea7a6355c8d3c3be648016a2 Modified Files -------------- src/backend/postmaster/checkpointer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-08-07 12:00 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-08-07 11:59 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 11:59 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 12:00 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 12:00 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 12:00 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 12:00 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org> 2025-08-07 12:00 pgsql: Fix checkpointer shared memory allocation Alexander Korotkov <akorotkov@postgresql.org>
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