Re: Default wal_sync_method on FreeBSD - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Default wal_sync_method on FreeBSD
Date
Msg-id CA+hUKG+z5hkmvFSA-9e7Xi8Gv4+uhxMMaU4-dXJ-iOtD9fZ9NA@mail.gmail.com
Whole thread Raw
In response to Default wal_sync_method on FreeBSD  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Fri, Jan 8, 2021 at 2:19 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> The system header change has one interesting consequence for existing
> releases of PostgreSQL, though: xlogdefs.h now sees that there is an
> O_DSYNC macro that is distinct from O_SYNC, and defaults to
> wal_sync_method=open_datasync.  That's not a great default setting,
> because it gets you O_DIRECT | O_DSYNC, which performs terribly when
> you're writing 8KB blocks on UFS's default 32KB logical block size (it
> triggers read-before-write, quite visibly destroying performance with
> eg pg_test_fsync), and for all I know, it might even not work at all
> on some other file systems.  I suspect it might come out very slightly
> ahead on a UFS filesystem created with 8KB blocks, but in any case,
> that seems like something you should have to opt in to, as you do on
> Linux.

Done.



pgsql-hackers by date:

Previous
From: "Seamus Abshere"
Date:
Subject: A reloption for partitioned tables - parallel_workers
Next
From: Amit Kapila
Date:
Subject: Re: repeated decoding of prepared transactions