Re: Pre-allocating WAL files

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Pre-allocating WAL files
Дата
Msg-id Z5EuOBav0sc_vG9c@nathan
обсуждение исходный текст
Ответ на Re: Pre-allocating WAL files  (Andres Freund <andres@anarazel.de>)
Ответы Re: Pre-allocating WAL files
Список pgsql-hackers
On Wed, Jan 22, 2025 at 11:21:03AM -0500, Andres Freund wrote:
> fsync(open(oldname1));
> fsync(open(oldname2));
> ..
> fsync(open(oldnameN));
> 
> rename(oldname1, newname1);
> rename(oldname2, newname2);
> ..
> rename(oldnameN, newnameN);
> 
> fsync(open(newname1));
> fsync(open(newname2));
> ..
> fsync(open(newnameN));
> 
> fsync(open("pg_wal"));

What is the purpose of syncing the file before the rename?

-- 
nathan



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