From 09a3b19e38ee09ce1f12cee9b9537ae66d729ead Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 15 Feb 2021 15:43:39 +1300 Subject: 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 --- src/backend/utils/misc/postgresql.conf.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/utils/misc/postgresql.conf.sample') diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 8650e771672..27e22835b21 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -185,7 +185,7 @@ #wal_sync_method = fsync # the default is the first option # supported by the operating system: # open_datasync - # fdatasync (default on Linux) + # fdatasync (default on Linux and FreeBSD) # fsync # fsync_writethrough # open_sync -- cgit v1.2.3