Re: recovery_min_apply_delay in archive recovery causes assertionfailure in latch

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: recovery_min_apply_delay in archive recovery causes assertionfailure in latch
Дата
Msg-id 20191017053513.GA17439@paquier.xyz
обсуждение исходный текст
Ответ на Re: recovery_min_apply_delay in archive recovery causes assertionfailure in latch  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: recovery_min_apply_delay in archive recovery causes assertionfailure in latch
Список pgsql-hackers
On Tue, Oct 08, 2019 at 02:18:00AM +0900, Fujii Masao wrote:
> On Fri, Oct 4, 2019 at 9:03 PM Fujii Masao <masao.fujii@gmail.com> wrote:
>> So archive recovery with recovery_min_apply_delay enabled would be
>> intended configuration. My patch that changes archive recovery so that
>> it always ignores thesetting might be in wrong direction. Maybe we should
>> make recovery_min_apply_delay work properly even in archive recovery.
>> Thought?
>
> Patch attached. This patch allows archive recovery with
> recovery_min_apply_delay set, but not crash recovery.

Right.  In short it makes no sense to wait the delay when in crash
recovery.  After more testing I have been able to reproduce the
failure myself.

+   /* nothing to do if crash recovery is requested */
+   if (!ArchiveRecoveryRequested && !StandbyModeRequested)
+       return false;

ArchiveRecoveryRequested will be set to true if recovery.signal or
standby.signal are found, so it seems to me that you can make all
those checks more simple by removing from the equation
StandbyModeRequested, no?  StandbyModeRequested is never set to true
if ArchiveRecoveryRequested is not itself true.

It would be nice to test some scenario within 002_archiving.pl.
--
Michael

Вложения

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays