ITAGAKI Takahiro wrote:
> Tom Lane <[EMAIL PROTECTED]> 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to