Re: Volatile write caches on macOS and Windows, redux

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: Volatile write caches on macOS and Windows, redux
Дата
в 13:49:57
Msg-id
c0e6421d-8317-4cf0-b94b-d832b64265a5@eisentraut.org
Ответ на
Список
Дерево обсуждения
Volatile write caches on macOS and Windows, redux Thomas Munro <thomas.munro@gmail.com>
Re: Volatile write caches on macOS and Windows, redux Jelte Fennema-Nio <postgres@jeltef.nl>
Re: Volatile write caches on macOS and Windows, redux Peter Eisentraut <peter@eisentraut.org>
Re: Volatile write caches on macOS and Windows, redux Nathan Bossart <nathandbossart@gmail.com>
Re: Volatile write caches on macOS and Windows, redux Peter Eisentraut <peter@eisentraut.org>
Re: Volatile write caches on macOS and Windows, redux Peter Smith <smithpb2250@gmail.com>
Re: Volatile write caches on macOS and Windows, redux vignesh C <vignesh21@gmail.com>
Re: Volatile write caches on macOS and Windows, redux Thomas Munro <thomas.munro@gmail.com>
Re: Volatile write caches on macOS and Windows, redux Thomas Munro <thomas.munro@gmail.com>
Re: Volatile write caches on macOS and Windows, redux Nathan Bossart <nathandbossart@gmail.com>
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 loss, or they don't. I
> doubt many people want his third intermediate option, which afaict
> basically means lose data on powerloss less often than fsync=false but
> still lose data most of the time.

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
}



В списке pgsql-hackers по дате отправления
FAQ