localbuf: Introduce StartLocalBufferIO()
Andres Freund <andres@anarazel.de>
localbuf: Introduce StartLocalBufferIO() To initiate IO on a shared buffer we have StartBufferIO(). For temporary table buffers no similar function exists - likely because the code for that currently is very simple due to the lack of concurrency. However, the upcoming AIO support will make it possible to re-encounter a local buffer, while the buffer already is the target of IO. In that case we need to wait for already in-progress IO to complete. This commit makes it easier to add the necessary code, by introducing StartLocalBufferIO(). Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/CAAKRu_b9anbWzEs5AAF9WCvcEVmgz-1AkHSQ-CLLy-p7WHzvFw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | modified | +2 −6 |
| src/backend/storage/buffer/localbuf.c | modified | +36 −0 |
| src/include/storage/buf_internals.h | modified | +1 −0 |
Discussion
- AIO v2.0 213 messages · 2024-09-01 → 2025-07-29