pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix waiting in RegisterSyncRequest(). 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix waiting in RegisterSyncRequest(). @ 2022-03-16 02:49 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-03-16 02:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix waiting in RegisterSyncRequest(). If we run out of space in the checkpointer sync request queue (which is hopefully rare on real systems, but common with very small buffer pool), we wait for it to drain. While waiting, we should report that as a wait event so that users know what is going on, and also handle postmaster death, since otherwise the loop might never terminate if the checkpointer has exited. Back-patch to 12. Although the problem exists in earlier releases too, the code is structured differently before 12 so I haven't gone any further for now, in the absence of field complaints. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3390ef1b7be28eac24dd95af23a4a287e6e7b1a4 Modified Files -------------- doc/src/sgml/monitoring.sgml | 5 +++++ src/backend/storage/sync/sync.c | 4 +++- src/backend/utils/activity/wait_event.c | 3 +++ src/include/utils/wait_event.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix waiting in RegisterSyncRequest(). @ 2022-03-16 02:49 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-03-16 02:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix waiting in RegisterSyncRequest(). If we run out of space in the checkpointer sync request queue (which is hopefully rare on real systems, but common with very small buffer pool), we wait for it to drain. While waiting, we should report that as a wait event so that users know what is going on, and also handle postmaster death, since otherwise the loop might never terminate if the checkpointer has exited. Back-patch to 12. Although the problem exists in earlier releases too, the code is structured differently before 12 so I haven't gone any further for now, in the absence of field complaints. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1396b5c6ed2bf46433c77ad0ce7f1ddaa984c224 Modified Files -------------- doc/src/sgml/monitoring.sgml | 5 +++++ src/backend/storage/sync/sync.c | 4 +++- src/backend/utils/activity/wait_event.c | 3 +++ src/include/utils/wait_event.h | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix waiting in RegisterSyncRequest(). @ 2022-03-16 02:49 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-03-16 02:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix waiting in RegisterSyncRequest(). If we run out of space in the checkpointer sync request queue (which is hopefully rare on real systems, but common with very small buffer pool), we wait for it to drain. While waiting, we should report that as a wait event so that users know what is going on, and also handle postmaster death, since otherwise the loop might never terminate if the checkpointer has exited. Back-patch to 12. Although the problem exists in earlier releases too, the code is structured differently before 12 so I haven't gone any further for now, in the absence of field complaints. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/cfdb303be756d846031ba1c1d1ff2cae39a62c15 Modified Files -------------- doc/src/sgml/monitoring.sgml | 5 +++++ src/backend/postmaster/pgstat.c | 3 +++ src/backend/storage/sync/sync.c | 4 +++- src/include/pgstat.h | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix waiting in RegisterSyncRequest(). @ 2022-03-16 02:50 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-03-16 02:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix waiting in RegisterSyncRequest(). If we run out of space in the checkpointer sync request queue (which is hopefully rare on real systems, but common with very small buffer pool), we wait for it to drain. While waiting, we should report that as a wait event so that users know what is going on, and also handle postmaster death, since otherwise the loop might never terminate if the checkpointer has exited. Back-patch to 12. Although the problem exists in earlier releases too, the code is structured differently before 12 so I haven't gone any further for now, in the absence of field complaints. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/368ffdeee422e8df57330a290f32b986291c2584 Modified Files -------------- doc/src/sgml/monitoring.sgml | 7 ++++++- src/backend/postmaster/pgstat.c | 3 +++ src/backend/storage/sync/sync.c | 4 +++- src/include/pgstat.h | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-03-16 02:50 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-03-16 02:49 pgsql: Fix waiting in RegisterSyncRequest(). Thomas Munro <tmunro@postgresql.org> 2022-03-16 02:49 pgsql: Fix waiting in RegisterSyncRequest(). Thomas Munro <tmunro@postgresql.org> 2022-03-16 02:49 pgsql: Fix waiting in RegisterSyncRequest(). Thomas Munro <tmunro@postgresql.org> 2022-03-16 02:50 pgsql: Fix waiting in RegisterSyncRequest(). Thomas Munro <tmunro@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