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
---
ITAGAKI Takahiro
NTT Cyber Space Laboratories