mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Replace buffer I/O locks with condition variables.
1. Backends waiting for buffer I/O are now interruptible. 2. If something goes wrong in a backend that is currently performing I/O, waiting backends no longer wake up until that backend reaches AbortBufferIO() and broadcasts on the CV. Previously, any waiters would wake up (because the I/O lock was automatically released) and then busy-loop until AbortBufferIO() cleared BM_IO_IN_PROGRESS. 3. LWLockMinimallyPadded is removed, as it would now be unused. Author: Robert Haas <robertmhaas@gmail.com> Reviewed-by: Thomas Munro <thomas.munro@gmail.com> Reviewed-by: Julien Rouhaud <rjuju123@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (earlier version, 2016) Discussion: https://postgr.es/m/CA%2BhUKGJ8nBFrjLuCTuqKN0pd2PQOwj9b_jnsiGFFMDvUxahj_A%40mail.gmail.com Discussion: https://postgr.es/m/CA+Tgmoaj2aPti0yho7FeEf2qt-JgQPRWb0gci_o1Hfr=C56Xng@mail.gmail.com
This commit is contained in:
@ -1586,6 +1586,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<entry>Waiting for the page number needed to continue a parallel B-tree
|
||||
scan to become available.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>BufferIO</literal></entry>
|
||||
<entry>Waiting for buffer I/O to complete.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>CheckpointDone</literal></entry>
|
||||
<entry>Waiting for a checkpoint to complete.</entry>
|
||||
@ -1876,10 +1880,6 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<entry><literal>BufferContent</literal></entry>
|
||||
<entry>Waiting to access a data page in memory.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>BufferIO</literal></entry>
|
||||
<entry>Waiting for I/O on a data page.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>BufferMapping</literal></entry>
|
||||
<entry>Waiting to associate a data block with a buffer in the buffer
|
||||
|
Reference in New Issue
Block a user