]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Default to wal_sync_method=fdatasync on FreeBSD.
authorThomas Munro <tmunro@postgresql.org>
Mon, 15 Feb 2021 02:43:39 +0000 (15:43 +1300)
committerThomas Munro <tmunro@postgresql.org>
Mon, 15 Feb 2021 03:05:42 +0000 (16:05 +1300)
commit6c23e5ae9ee12ff1f5183573885bfaa4eb97b243
tree5c74a755b5d0f58e33f7d4533399e7df2b0d21d4
parent9fe40913c45dcb78d3271fdc2dcf21ff15bee583
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
doc/src/sgml/config.sgml
src/backend/utils/misc/postgresql.conf.sample
src/include/port/freebsd.h