Re: Final(?) proposal for wal_sync_method changes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Magnus Hagander <magnus@hagander.net>
Cc: Josh Berkus <josh@agliodbs.com>, Bruce Momjian <bruce@momjian.us>, pgsql-hackers@postgresql.org
Date: 2010-12-08T21:18:37Z
Lists: pgsql-hackers
Attachments
- sync-changes-code-only.patch (text/x-patch) patch
Given my concerns around exactly what is going on in the Windows code, I'm now afraid to mess with an all-platforms change to fdatasync as the preferred default; if we do that it should probably just be in HEAD not the back branches. So I've come around to the idea that Marti's proposal of a PLATFORM_DEFAULT_SYNC_METHOD symbol is the best way. (One reason for adopting that rather than some other way is that it seems quite likely we'll end up needing it for Windows.) I haven't touched the documentation yet, but attached is a proposed code patch against HEAD. This forces the default to fdatasync on Linux, and makes some cosmetic cleanups around the HAVE_FSYNC_WRITETHROUGH_ONLY confusion. regards, tom lane