Re: posix_fadvise missing in the walsender - Mailing list pgsql-hackers

From Joachim Wieland
Subject Re: posix_fadvise missing in the walsender
Date
Msg-id CACw0+11vpW9PAnZ1ZDN8O5D3KeKN8Bj9TGSqem4KA1nriAewaA@mail.gmail.com
Whole thread Raw
In response to Re: posix_fadvise missing in the walsender  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Tue, Feb 19, 2013 at 5:48 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>>> 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);
>>>>
>
> I agree with Merlin and Joachim - if we have the call in one place, we
> should have it in both.

You could argue that if it's considered beneficial in the case with no
walsender, then you should definitely have it if there are walsenders
around:
The walsenders reopen and read those files which gives the OS reason
to believe that other processes might do the same in the near future
and hence that it should not evict those pages too early.


Joachim



pgsql-hackers by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: bugfix: --echo-hidden is not supported by \sf statements
Next
From: Noah Misch
Date:
Subject: Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it