Thread: pgsql: bufmgr/smgr: Don't cross segment boundaries in StartReadBuffers(
bufmgr/smgr: Don't cross segment boundaries in StartReadBuffers() With real AIO it doesn't make sense to cross segment boundaries with one IO. Add smgrmaxcombine() to allow upper layers to query which buffers can be merged. We could continue to cross segment boundaries when not using AIO, but it doesn't really make sense, because md.c will never be able to perform the read across the segment boundary in one system call. Which means we'll mark more buffers as undergoing IO than really makes sense - if another backend desires to read the same blocks, it'll be blocked longer than necessary. So it seems better to just never cross the boundary. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/1f6b50a7-38ef-4d87-8246-786d39f46ab9@iki.fi Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/755a4c10d19dbe432a1860cced914c570ff3becc Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 18 ++++++++++++++++++ src/backend/storage/smgr/md.c | 21 +++++++++++++++++++++ src/backend/storage/smgr/smgr.c | 22 ++++++++++++++++++++++ src/include/storage/md.h | 2 ++ src/include/storage/smgr.h | 2 ++ 5 files changed, 65 insertions(+)