From: | Joachim Wieland <joe(at)mcknight(dot)de> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | posix_fadvise missing in the walsender |
Date: | 2013-02-17 12:55:46 |
Message-ID: | CACw0+11v0JziktY8Adp_O7M-VHkQSETCZmepBd+gw2uRUcYVAQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In access/transam/xlog.c we give the OS buffer caching a hint that we
won't need a WAL file any time soon with
posix_fadvise(openLogFile, 0, 0, POSIX_FADV_DONTNEED);
before closing the WAL file, but only if we don't have walsenders.
That's reasonable because the walsender will reopen that same file
shortly after.
However the walsender doesn't call posix_fadvise once it's done with
the file and I'm proposing to add this to walsender.c for consistency
as well.
Since there could be multiple walsenders, only the "slowest" one
should call this function. Finding out the slowest walsender can be
done by inspecting the shared memory and looking at the sentPtr of
each walsender.
Any comments?
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-02-17 14:22:10 | overlapping strncpy/memcpy errors via valgrind |
Previous Message | Pavel Stehule | 2013-02-17 09:35:02 | plpgsql_check_function - implementation |