pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Limit checkpointer requests queue size 6+ messages / 1 participants [nested] [flat]
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bae50782170c9de8aa13700423923a5bb9d6b9e9 Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/13559de95383b493a6e6384dcb621947bb8bcc23 Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f0cdc2afd15e51f580e53ebd269bd66ec0aaaa79 Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b248a3ba4e51328f6289c28b30d5145bdde0a937 Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/50026136cc86c9d8c95135b7d1eebeda516e31ec Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Limit checkpointer requests queue size @ 2025-07-27 12:33 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Alexander Korotkov @ 2025-07-27 12:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Limit checkpointer requests queue size If the number of sync requests is big enough, the palloc() call in AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory, resulting in failure. This can lead to an infinite loop in the checkpointer process, as it repeatedly fails to absorb the pending requests. This commit limits the checkpointer requests queue size to 10M items. In addition to preventing the palloc() failure, this change helps to avoid long queue processing time. Also, this commit is for backpathing only. The master branch receives a more invasive yet comprehensive fix for this problem. Discussion: https://postgr.es/m/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru Backpatch-through: 13 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f32a471612c9e6adc87254239299024ff3b487ec Modified Files -------------- src/backend/postmaster/checkpointer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-07-27 12:33 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size Alexander Korotkov <akorotkov@postgresql.org> 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size Alexander Korotkov <akorotkov@postgresql.org> 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size Alexander Korotkov <akorotkov@postgresql.org> 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size Alexander Korotkov <akorotkov@postgresql.org> 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size Alexander Korotkov <akorotkov@postgresql.org> 2025-07-27 12:33 pgsql: Limit checkpointer requests queue size 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