Subject: Re: Volatile write caches on macOS and Windows, redux

From: Thomas Munro <[email-masked]>
Date: Thu, 14 Mar 2024 13:12:05 +1300

Short sales pitch for these patches:

* the default settings eat data on Macs and Windows
* nobody understands what wal_sync_method=fsync_writethrough means anyway
* it's a weird kludge that it affects not only WAL, let's clean that up

---

From: Nathan Bossart <[email-masked]>
Date: Fri, 24 May 2024 23:41:18 -0500

> * it's a weird kludge that it affects not only WAL, let's clean that up

I recently started using macOS for hacking on Postgres and noticed this
problem, so I was delighted to find this thread.  I intend to review
further soon, but +1 for improving the default settings.  I think we might
also need some additional fcntl(F_FULLFSYNC) calls in sync_pgdata(),
sync_dir_recurse(), etc., which are used by initdb, pg_basebackup, and
more.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com