Re: silent data loss with ext4 / all current versions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: silent data loss with ext4 / all current versions
Дата
Msg-id 20160306035405.toq3a4l3xjg5xhmd@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: silent data loss with ext4 / all current versions  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: silent data loss with ext4 / all current versions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2016-03-05 22:25:36 +0900, Michael Paquier wrote:
> OK, I hacked a v7:
> - Move the link()/rename() group with HAVE_WORKING_LINK into a single
> routine, making the previous link_safe renamed to replace_safe. This
> is sharing a lot of things with rename_safe. I am not sure it is worth
> complicating the code more this way by having a common single routine
> for whole. Thoughts welcome. Honestly, I kind of liked the separation
> with link_safe/rename_safe of previous patches because link_safe could
> have been directly used by extensions and plugins btw.
> - Remove the call of stat() in rename_safe() and implement a logic
> depending on OpenTransientFile()/pg_fsync() to flush any existing
> target file before performing the rename.
> Andres, feel free to use this patch as a base, perhaps that will help.

I started working on this; delayed by taking longer than planned on the
logical decoding stuff (quite a bit complicated by
e1a11d93111ff3fba7a91f3f2ac0b0aca16909a8).  I'm not very happy with the
error handling as it is right now.  For one, you have rename_safe return
error codes, and act on them in the callers, but on the other hand you
call fsync_fname which always errors out in case of failure.  I also
don't like the new messages much.

Will continue working on this tomorrow.

Andres Freund



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Fix handling of invalid sockets returned by PQsocket()
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Proposal: SET ROLE hook