On Thu, Dec 5, 2013 at 11:42 AM, Greg Stark <st...@mit.edu> wrote: > (b) is the way more interesting research project though. I don't think > anyone's tried it and the kernel interface to provide the kinds of > information Postgres needs requires a lot of thought. If it's done > right then Postgres wouldn't need a buffer cache manager at all. It > would just mmap the entire database and tell the kernel when it's safe > to flush buffers and let the kernel decide when based on when it's > convenient for the hardware.
That's a bad idea in the current state of affairs. MM files haven't been designed for that usage, and getting stable performance out of that will be way too difficult. systemd's journal is finding that out the hard way. It uses mmap too. Having the buffer manager mmap buffers into its shared address space, however, might be an interesting idea to pursue. However, one must not forget that the kernel has similar scalability issues when the number of memory mappings increase arbitrarily. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers