Re: [HACKERS] Potential data loss of 2PC files

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: [HACKERS] Potential data loss of 2PC files
Дата
Msg-id 1ba0a71a-0821-5003-8b8c-5bd7c8abc3e7@sigaev.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Potential data loss of 2PC files  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Potential data loss of 2PC files  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
>>> If that can happen, don't we have the same problem in many other places?
>>> Like, all the SLRUs? They don't fsync the directory either.
>> Right, pg_commit_ts and pg_clog enter in this category.
>
> Implemented as attached.
>
>>> Is unlink() guaranteed to be durable, without fsyncing the directory? If
>>> not, then we need to fsync() the directory even if there are no files in it
>>> at the moment, because some might've been removed earlier in the checkpoint
>>> cycle.

What is protection if pg crashes after unlimk() but before fsync()? Right, it's 
rather small window for such scenario, but isn't better to  have another 
protection? Like WAL-logging of WAL segment removing...

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: David Steele
Дата:
Сообщение: Re: [HACKERS] [PATCH] kNN for SP-GiST
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)