Re: Use durable_unlink for .ready and .done files for WAL segmentremoval

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Use durable_unlink for .ready and .done files for WAL segmentremoval
Дата
Msg-id 20181127211904.GK1716@paquier.xyz
обсуждение исходный текст
Ответ на Re: Use durable_unlink for .ready and .done files for WAL segmentremoval  ("Bossart, Nathan" <bossartn@amazon.com>)
Ответы Re: Use durable_unlink for .ready and .done files for WAL segmentremoval  ("Bossart, Nathan" <bossartn@amazon.com>)
Список pgsql-hackers
On Tue, Nov 27, 2018 at 08:43:06PM +0000, Bossart, Nathan wrote:
> Don't we also need to check that errno is ENOENT here?

Yep.

> IIUC any time that the file does not exist, we will attempt to unlink
> it.  Regardless of whether unlinking fails or succeeds, we then
> proceed to give up archiving for now, but it's not clear why.  Perhaps
> we should retry unlinking a number of times (like we do for
> pgarch_archiveXlog()) when durable_unlink() fails and simply "break"
> to move on to the next .ready file if durable_unlink() succeeds.

Both suggestions sound reasonable to me.  (durable_unlink is not called
on HEAD in pgarch_archiveXlog).  How about 3 retries with a in-between
wait of 1s?  That's consistent with what pgarch_ArchiverCopyLoop does,
still I am not completely sure if we actually want to be consistent for
the purpose of removing orphaned ready files.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Handling of REGRESS_OPTS in MSVC for regression tests
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Remove Deprecated Exclusive Backup Mode