postgresql/src/backend/postmaster
Alexander Korotkov 5cfbff48a4 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>
2025-08-07 14:31:18 +03:00
..
autovacuum.c Ensure we have a snapshot when updating various system catalogs. 2025-05-30 15:17:28 -05:00
auxprocess.c Fix a few oversights in the longer cancel keys patch 2025-04-09 13:11:42 +03:00
bgworker.c Fix background worker not restarting after crash-and-restart cycle. 2025-07-25 18:40:49 +09:00
bgwriter.c aio: Basic subsystem initialization 2025-03-17 18:51:33 -04:00
checkpointer.c Fix checkpointer shared memory allocation 2025-08-07 14:31:18 +03:00
fork_process.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
interrupt.c Revert function to get memory context stats for processes 2025-05-23 15:44:54 +02:00
launch_backend.c Remove the query_id_squash_values GUC 2025-03-27 13:33:37 +01:00
Makefile Assign a child slot to every postmaster child process 2024-11-14 16:12:28 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
pgarch.c Revert function to get memory context stats for processes 2025-05-23 15:44:54 +02:00
pmchild.c aio: Infrastructure for io_method=worker 2025-03-18 11:54:01 -04:00
postmaster.c Fix background worker not restarting after crash-and-restart cycle. 2025-07-25 18:40:49 +09:00
startup.c Revert function to get memory context stats for processes 2025-05-23 15:44:54 +02:00
syslogger.c backend launchers void * arguments for binary data 2025-02-21 08:03:33 +01:00
walsummarizer.c Revert function to get memory context stats for processes 2025-05-23 15:44:54 +02:00
walwriter.c aio: Basic subsystem initialization 2025-03-17 18:51:33 -04:00