pgsql: Default to wal_sync_method=fdatasync on FreeBSD.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Default to wal_sync_method=fdatasync on FreeBSD.
Date: 2021-02-15 03:24:18
Message-ID: E1lBUUk-0006sz-JL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Default to wal_sync_method=fdatasync on FreeBSD.

FreeBSD 13 gained O_DSYNC, which would normally cause wal_sync_method to
choose open_datasync as its default value. That may not be a good
choice for all systems, and performs worse than fdatasync in some
scenarios. Let's preserve the existing default behavior for now.

Like commit 576477e73c4, which did the same for Linux, back-patch to all
supported releases.

Discussion: https://postgr.es/m/CA%2BhUKGLsAMXBQrCxCXoW-JsUYmdOL8ALYvaX%3DCrHqWxm-nWbGA%40mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/09a3b19e38ee09ce1f12cee9b9537ae66d729ead

Modified Files
--------------
doc/src/sgml/config.sgml | 4 ++--
src/backend/utils/misc/postgresql.conf.sample | 2 +-
src/include/port/freebsd.h | 9 +++++++++
3 files changed, 12 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-02-15 03:29:36 pgsql: Adjust lazy_scan_heap() accounting comments.
Previous Message Thomas Munro 2021-02-15 03:24:02 pgsql: Default to wal_sync_method=fdatasync on FreeBSD.