Re: Use fadvise in wal replay

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Use fadvise in wal replay
Дата
Msg-id CALj2ACW=wcAvGWNPbexzCAMNiDLw=ODk73UdLx3MO1uRvZ9ocw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use fadvise in wal replay  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Use fadvise in wal replay  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Tue, Jun 21, 2022 at 4:55 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Jun 21, 2022 at 3:18 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
> >
> > > On 21 Jun 2022, at 12:35, Amit Kapila <amit.kapila16@gmail.com> wrote:
> > >
> > > I wonder if the newly introduced "recovery_prefetch" [1] for PG-15 can
> > > help your case?
> >
> > AFAICS recovery_prefetch tries to prefetch main fork, but does not try to prefetch WAL itself before reading it.
Kirillis trying to solve the problem of reading WAL segments that are our of OS page cache.
 
> >
>
> Okay, but normally the WAL written by walreceiver is read by the
> startup process soon after it's written as indicated in code comments
> (get_sync_bit()). So, what is causing the delay here which makes the
> startup process perform physical reads?

That's not always true. If there's a huge apply lag and/or
restartpoint is infrequent/frequent or there are many reads on the
standby - in all of these cases the OS cache can replace the WAL from
it causing the startup process to hit the disk for WAL reading.

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Use fadvise in wal replay
Следующее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Support logical replication of DDLs