Re: [HACKERS] fix use of posix_fadvise in xlog.c

2010-06-10 Thread Greg Smith
Tom Lane wrote: Heikki Linnakangas writes: In a steady-state situation new WAL files are not created very often because we recycle old ones, so it probably doesn't make much difference. Yeah. We really don't worry too much about the performance of the new-WAL-file-creation code path

Re: [HACKERS] fix use of posix_fadvise in xlog.c

2010-06-10 Thread Tom Lane
Heikki Linnakangas writes: > In a steady-state situation new WAL files are not created very often > because we recycle old ones, so it probably doesn't make much difference. Yeah. We really don't worry too much about the performance of the new-WAL-file-creation code path because of this.

Re: [HACKERS] fix use of posix_fadvise in xlog.c

2010-06-10 Thread Heikki Linnakangas
On 10/06/10 18:17, Mark Wong wrote: On Jun 9, 2010, at 11:25 PM, Heikki Linnakangas wrote: I don't think POSIX_FADV_DONTNEED does what you think it does. It tells the kernel that "you don't need to keep these pages in the cache anymore, I won't be accessing them anymore". If you call it when yo

Re: [HACKERS] fix use of posix_fadvise in xlog.c

2010-06-10 Thread Mark Wong
On Jun 9, 2010, at 11:25 PM, Heikki Linnakangas > wrote: On 10/06/10 06:47, Mark Wong wrote: I wanted to propose a fix for to xlog.c regarding the use of posix_fadvise() for 9.1 (unless someone feels it's ok for 9.0). Currently posix_fadvise() is used right before a log file is closed so

Re: [HACKERS] fix use of posix_fadvise in xlog.c

2010-06-09 Thread Heikki Linnakangas
On 10/06/10 06:47, Mark Wong wrote: I wanted to propose a fix for to xlog.c regarding the use of posix_fadvise() for 9.1 (unless someone feels it's ok for 9.0). Currently posix_fadvise() is used right before a log file is closed so it's effectively not doing anything, when posix_fadvise is to be

[HACKERS] fix use of posix_fadvise in xlog.c

2010-06-09 Thread Mark Wong
Hi all, I wanted to propose a fix for to xlog.c regarding the use of posix_fadvise() for 9.1 (unless someone feels it's ok for 9.0). Currently posix_fadvise() is used right before a log file is closed so it's effectively not doing anything, when posix_fadvise is to be called. This patch moves the