Use posix_fallocate() for new WAL files, where available.

Jeff Davis <jdavis@postgresql.org>

Commit: 269e780822abb2e44189afaccd6b0ee7aefa7ddd
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2013-07-05T19:30:29Z
Releases: 9.4.0
Use posix_fallocate() for new WAL files, where available.

This function is more efficient than actually writing out zeroes to
the new file, per microbenchmarks by Jon Nelson. Also, it may reduce
the likelihood of WAL file fragmentation.

Jon Nelson, with review by Andres Freund, Greg Smith and me.

Files

PathChange+/−
configure modified +2 −1
configure.in modified +1 −1
src/backend/access/transam/xlog.c modified +58 −35
src/include/pg_config.h.in modified +3 −0
src/include/pg_config.h.win32 modified +3 −0