pgsql: Fix waiting in RegisterSyncRequest().

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Fix waiting in RegisterSyncRequest().
Дата
Msg-id E1nUJji-000GHS-SJ@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix waiting in RegisterSyncRequest().
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: pageinspect: Fix handling of page sizes and AM types