Use durable_unlink for .ready and .done files for WAL segment removal

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Use durable_unlink for .ready and .done files for WAL segment removal
Дата
Msg-id 20180928032827.GF1500@paquier.xyz
обсуждение исходный текст
Ответы Re: Use durable_unlink for .ready and .done files for WAL segmentremoval  (Andres Freund <andres@anarazel.de>)
Re: Use durable_unlink for .ready and .done files for WAL segmentremoval  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Hi all,

While reviewing the archiving code, I have bumped into the fact that
XLogArchiveCleanup() thinks that it is safe to do only a plain unlink()
for .ready and .done files when removing a past segment.  I don't think
that it is a smart move, as on a subsequent crash we may still see
those, but the related segment would have gone away.  This is not really
a problem for .done files, but it could confuse the archiver to see some
.ready files about things that have already gone away.

Attached is a patch.  Thoughts?
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Segfault when creating partition with a primary key and sql_droptrigger exists
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Use durable_unlink for .ready and .done files for WAL segmentremoval