On Fri, Oct 18, 2024 at 12:15 PM Chet Ramey <chet.ra...@case.edu> wrote: > > On 10/18/24 11:51 AM, Chet Ramey wrote: > > On 10/17/24 8:27 PM, Grisha Levit wrote: > >> The mmap in history_do_write would usually fail when appending because > >> the offset must be a multiple of the page size. > > > > Thanks for the report. Not everyone requires this, but since some systems > > do, it's better to do this for portability. > > Of course, the fact that nothing defines HISTORY_USE_MMAP limits the > impact somewhat.
I was just composing a question about this -- is this intentional? It looks like it used to be behind HAVE_MMAP (which does get set) but changed soon after. I guess I wouldn't expect much of a performance difference between mmap- based and regular I/O for sequential access patterns like the ones here, though some rough testing I just did showed about a 30% improvement.