Re: Directory fsync and other fun

Поиск
Список
Период
Сортировка
От Takahiro Itagaki
Тема Re: Directory fsync and other fun
Дата
Msg-id 20100224115107.9738.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Directory fsync and other fun  (Andres Freund <andres@anarazel.de>)
Ответы Re: Directory fsync and other fun  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Directory fsync and other fun  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> wrote:

> I started setting up some halfway automated method of simulating hard crashes 
> and even while setting those up I found some pretty unsettling results...
> Now its not unlikely that my testing is flawed but unfortunately I don't see 
> where right now (its 3am now and I have a 8h trainride behind me, so ...)

I think the reported behavior is a TODO item to research:
* Research use of fsync to a newly created directory.  There is no guarantee that mkdir() flushes metadata of the
directory.

Also, I heard ext4 has a "feature" in that rename() might truncate the
renamed file to zero bytes on crash. The user data in the file might be
lost if the machine crashes just after rename().
* Research whether our use of rename() is safe on various file systems.  Especially on ext4, the contents of the
renamedfile might be lost on crash.
 

Comments and suggestion for improvements of words welcome.
If no objection, I'll add them at the Fsync section in the TODO page.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Directory fsync and other fun