Re: initdb and fsync

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: cedric@2ndquadrant.com
Cc: pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Noah Misch <noah@leadboat.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>
Date: 2012-03-26T02:59:36Z
Lists: pgsql-hackers

Attachments

On Sat, 2012-03-17 at 17:48 +0100, Cédric Villemain wrote:
> I agree with Andres.
> 
> 
> I believe we should use sync_file_range (_before?) with linux.
> 
> And we can use posix_fadvise_dontneed on other kernels.
> 
OK, updated patch attached. sync_file_range() is preferred,
posix_fadvise() is a fallback.

Regards,
	Jeff Davis