Provide multi-block smgrprefetch().
Thomas Munro <tmunro@postgresql.org>
Provide multi-block smgrprefetch(). Previously smgrprefetch() could issue POSIX_FADV_WILLNEED advice for a single block at a time. Add an nblocks argument so that we can do the same for a range of blocks. This usually produces a single system call, but might need to loop if it crosses a segment boundary. Initially it is only called with nblocks == 1, but proposed patches will make wider calls. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> (earlier version) Discussion: https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | modified | +1 −1 |
| src/backend/storage/buffer/localbuf.c | modified | +1 −1 |
| src/backend/storage/smgr/md.c | modified | +27 −10 |
| src/backend/storage/smgr/smgr.c | modified | +4 −3 |
| src/include/storage/md.h | modified | +1 −1 |
| src/include/storage/smgr.h | modified | +1 −1 |
Discussion
- Streaming I/O, vectored I/O (WIP) 67 messages · 2023-08-31 → 2024-08-17