Re: Use fadvise in wal replay - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Use fadvise in wal replay
Date
Msg-id CACB4423-3767-4F60-B0C2-8BD514883336@yandex-team.ru
Whole thread Raw
In response to RE: Use fadvise in wal replay  (Jakub Wartak <Jakub.Wartak@tomtom.com>)
List pgsql-hackers

> On 23 Jun 2022, at 12:50, Jakub Wartak <jakub.wartak@tomtom.com> wrote:
>
> Thoughts?

I've looked into the patch one more time. And I propose to change this line
+        posix_fadvise(readFile, readOff + RACHUNK, RACHUNK, POSIX_FADV_WILLNEED);
to
+        posix_fadvise(readFile, readOff + XLOG_BLCKSZ, RACHUNK, POSIX_FADV_WILLNEED);

Currently first 128Kb of the file are not prefetched. But I expect that this change will produce similar performance
results.I propose this change only for consistency, so we prefetch all data that we did not prefetch yet and going to
read.What do you think? 

Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal to introduce a shuffle function to intarray extension
Next
From: Alvaro Herrera
Date:
Subject: Re: limits of max, min optimization