posix_fadvise missing in the walsender

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема posix_fadvise missing in the walsender
Дата
Msg-id CACw0+11v0JziktY8Adp_O7M-VHkQSETCZmepBd+gw2uRUcYVAQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: posix_fadvise missing in the walsender  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список 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?



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: plpgsql_check_function - implementation
Следующее
От: Andres Freund
Дата:
Сообщение: overlapping strncpy/memcpy errors via valgrind