From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Free WAL caches on switching segments |
Date: | 2005-09-23 17:56:09 |
Message-ID: | 200509231756.j8NHu9U13411@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
ITAGAKI Takahiro wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > > Here is a small patch to prevent undesired WAL file caching by kernel.
> > > posix_fadvise(POSIX_FADV_DONTNEED) attempts to free cached pages and
> > > the kernel will discard them in preference to other data caches.
> >
> > On plenty of platforms, this won't even compile ...
>
>
> Do you mean simply following code? or more pretty way?
>
> #ifdef POSIX_FADV_DONTNEED
> posix_fadvise(openLogFile, 0, 0, POSIX_FADV_DONTNEED);
> #endif
Yes, but we probably have to have a configure test to see if
posix_fadvise exists too. I will keep this for 8.2.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-09-23 19:59:11 | Re: be-secure.c patch |
Previous Message | Neil Conway | 2005-09-23 09:08:36 | Re: Multiple -t options for pg_dump |