Re: Volatile write caches on macOS and Windows, redux

2024-06-04 Thread Peter Eisentraut
On 03.06.24 17:28, Nathan Bossart wrote: I agree, two states should be enough. It could basically just be pg_fsync(int fd) { #if macos fcntl(fd, F_FULLFSYNC); #else fsync(fd); #endif } IIUC with this approach, anyone who is using a file system that fails fcntl(F_FULLSYNC) with ENOSUP

Re: Volatile write caches on macOS and Windows, redux

2024-06-03 Thread Nathan Bossart
On Wed, May 29, 2024 at 06:49:57AM -0700, Peter Eisentraut wrote: > On 25.05.24 04:01, Jelte Fennema-Nio wrote: >> Is this the only reason why you're suggesting adding fsync=full, >> instead of simply always setting F_FULLFSYNC when fsync=true on MacOS. >> If so, I'm not sure we really gain anythin

Re: Volatile write caches on macOS and Windows, redux

2024-05-29 Thread Peter Eisentraut
On 25.05.24 04:01, Jelte Fennema-Nio wrote: Is this the only reason why you're suggesting adding fsync=full, instead of simply always setting F_FULLFSYNC when fsync=true on MacOS. If so, I'm not sure we really gain anything by this tri-state. I think people either care about data loss on power lo

Re: Volatile write caches on macOS and Windows, redux

2024-05-25 Thread Jelte Fennema-Nio
On Tue, 18 Jul 2023 at 05:29, Thomas Munro wrote: > It's possible that fcntl(F_FULLFSYNC) might fail with ENOSUPP or other > errors in obscure cases (eg unusual file systems). In that case, you > could manually lower fsync to just "on" and do your own research on > whether power loss can toast yo

Re: Volatile write caches on macOS and Windows, redux

2024-05-24 Thread Nathan Bossart
On Thu, Mar 14, 2024 at 01:12:05PM +1300, Thomas Munro wrote: > 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

Re: Volatile write caches on macOS and Windows, redux

2024-03-13 Thread Thomas Munro
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

Re: Volatile write caches on macOS and Windows, redux

2024-03-01 Thread Thomas Munro
Rebased over 8d140c58. v2-0001-Make-wal_sync_method-fdatasync-the-default-on-all.patch Description: Binary data v2-0002-Remove-fsync_writethrough-add-fsync-full-macOS-on.patch Description: Binary data

Re: Volatile write caches on macOS and Windows, redux

2024-02-01 Thread vignesh C
On Mon, 22 Jan 2024 at 07:46, Peter Smith wrote: > > 2024-01 Commitfest. > > Hi, this patch was marked in CF as "Needs Review" [1], but there has > been no activity on this thread for 6+ months. > > Is anything else planned, or can you post something to elicit more > interest in the patch? Otherwi

Re: Volatile write caches on macOS and Windows, redux

2024-01-21 Thread Peter Smith
2024-01 Commitfest. Hi, this patch was marked in CF as "Needs Review" [1], but there has been no activity on this thread for 6+ months. Is anything else planned, or can you post something to elicit more interest in the patch? Otherwise, if nothing happens then the CF entry will be closed ("Return

Volatile write caches on macOS and Windows, redux

2023-07-17 Thread Thomas Munro
Hi, Continuing a topic from earlier threads[1][2], I've been wondering about how to de-klugify wal_sync_method=fsync_writethrough (a setting that actually affects much more than just WAL), and how to do the right thing for our users on macOS and Windows by default. Commit d0c28601 was a very smal