mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
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
This commit is contained in:
@ -1483,7 +1483,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<entry>Waiting for confirmation from remote server during synchronous replication.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry morerows="2"><literal>Timeout</literal></entry>
|
||||
<entry morerows="3"><literal>Timeout</literal></entry>
|
||||
<entry><literal>BaseBackupThrottle</literal></entry>
|
||||
<entry>Waiting during base backup when throttling activity.</entry>
|
||||
</row>
|
||||
@ -1495,6 +1495,11 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<entry><literal>RecoveryApplyDelay</literal></entry>
|
||||
<entry>Waiting to apply WAL at recovery because it is delayed.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>RegisterSyncRequest</literal></entry>
|
||||
<entry>Waiting while sending synchronization requests to the
|
||||
checkpointer, because the request queue is full.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry morerows="67"><literal>IO</literal></entry>
|
||||
<entry><literal>BufFileRead</literal></entry>
|
||||
|
Reference in New Issue
Block a user