mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 00:20:24 +01:00
In order to have the option to use O_DIRECT/FILE_FLAG_NO_BUFFERING in a
later commit, we need the addresses of user space buffers to be well
aligned. The exact requirements vary by OS and file system (typically
sectors and/or memory pages). The address alignment size is set to
4096, which is enough for currently known systems: it matches modern
sectors and common memory page size. There is no standard governing
O_DIRECT's requirements so we might eventually have to reconsider this
with more information from the field or future systems.
Aligning I/O buffers on memory pages is also known to improve regular
buffered I/O performance.
Three classes of I/O buffers for regular data pages are adjusted:
(1) Heap buffers are now allocated with the new palloc_aligned() or
MemoryContextAllocAligned() functions introduced by commit
|
||
|---|---|---|
| .. | ||
| expected | ||
| sql | ||
| t | ||
| .gitignore | ||
| blcost.c | ||
| blinsert.c | ||
| bloom--1.0.sql | ||
| bloom.control | ||
| bloom.h | ||
| blscan.c | ||
| blutils.c | ||
| blvacuum.c | ||
| blvalidate.c | ||
| Makefile | ||
| meson.build | ||