mirror of https://github.com/postgres/postgres
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 576477e73c
, 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
pull/61/head
parent
2c8b42b50d
commit
f900a79ecd
@ -1 +1,10 @@ |
||||
/* src/include/port/freebsd.h */ |
||||
|
||||
/*
|
||||
* Set the default wal_sync_method to fdatasync. xlogdefs.h's normal rules |
||||
* would prefer open_datasync on FreeBSD 13+, but that is not a good choice on |
||||
* many systems. |
||||
*/ |
||||
#ifdef HAVE_FDATASYNC |
||||
#define PLATFORM_DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC |
||||
#endif |
||||
|
Loading…
Reference in new issue