Re: posix_fadvise missing in the walsender

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: posix_fadvise missing in the walsender
Date: 2013-02-20 03:16:30
Message-ID: CACw0+11vpW9PAnZ1ZDN8O5D3KeKN8Bj9TGSqem4KA1nriAewaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 19, 2013 at 5:48 PM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

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