Hacker News new | ask | show | jobs
by salarycommenter 3171 days ago
Interesting. Mapping 64k at a time seems a bit excessive. If I call mmap it's to map everything I'm going to need, but maybe I am missing context.
1 comments

PostgreSQL still supports 32-bit platforms, heap and index files can get large enough that it's not feasible to mmap them into a 32-bit process. As far as the specific number of 64k though, I don't know why they choose that, writing 8 pages to disk at a time (especially sequentially) doesn't really take advantage of modern hardware well.