Re: Use fadvise in wal replay

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Use fadvise in wal replay
Дата
Msg-id D694E73D-9633-407B-A015-95485EE352C9@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Use fadvise in wal replay  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Use fadvise in wal replay
Список pgsql-hackers
Hi Bharath,

thank you for the suggestion.

> On 5 Aug 2022, at 16:02, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Thu, Aug 4, 2022 at 9:48 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>>
>>> On 18 Jul 2022, at 22:55, Robert Haas <robertmhaas@gmail.com> wrote:
>>>
>>> On Thu, Jun 23, 2022 at 5:49 AM Jakub Wartak <Jakub.Wartak@tomtom.com> wrote:
>
> I have a fundamental question on the overall idea - How beneficial it
> will be if the process that's reading the current WAL page only does
> (at least attempts) the prefetching of future WAL pages? Won't the
> benefit be higher if "some" other background process does prefetching?

IMO prefetching from other thread would have negative effect.
fadvise() call is non-blocking, startup process won't do IO. It just informs kernel to schedule asynchronous page read.
On the other hand synchronization with other process might cost more than fadvise().

Anyway cost of calling fadise() once per 16 page reads is neglectable.

Thank you!

Best regards, Andrey Borodin.


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [RFC] building postgres with meson -v
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] Expose port->authn_id to extensions and triggers