]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Force default wal_sync_method to be fdatasync on Linux.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Dec 2010 01:01:33 +0000 (20:01 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Dec 2010 01:01:33 +0000 (20:01 -0500)
commit6b2c0eab1f2f0b86ebf2721749689e6b839bc279
tree4d0b6acf0aa109771edef8f382248045f69c7cc3
parent0ae63a4fb2db1131e0715810199de0c0a8e7c2d8
Force default wal_sync_method to be fdatasync on Linux.

Recent versions of the Linux system header files cause xlogdefs.h to
believe that open_datasync should be the default sync method, whereas
formerly fdatasync was the default on Linux.  open_datasync is a bad
choice, first because it doesn't actually outperform fdatasync (in fact
the reverse), and second because we try to use O_DIRECT with it, causing
failures on certain filesystems (e.g., ext4 with data=journal option).
This part of the patch is largely per a proposal from Marti Raudsepp.
More extensive changes are likely to follow in HEAD, but this is as much
change as we want to back-patch.

Also clean up confusing code and incorrect documentation surrounding the
fsync_writethrough option.  Those changes shouldn't result in any actual
behavioral change, but I chose to back-patch them anyway to keep the
branches looking similar in this area.

In 9.0 and HEAD, also do some copy-editing on the WAL Reliability
documentation section.

Back-patch to all supported branches, since any of them might get used
on modern Linux versions.
doc/src/sgml/config.sgml
src/backend/access/transam/xlog.c
src/backend/storage/file/fd.c
src/backend/utils/misc/postgresql.conf.sample
src/include/port/linux.h
src/include/port/win32.h