Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code
Дата
Msg-id CAB7nPqSbanVp6kFYnKXkqREJ_x5iuq4RSH9A6s-KuMk3w5VU0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Jan 19, 2015 at 4:10 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Sat, Jan 17, 2015 at 2:44 AM, Andres Freund <andres@2ndquadrant.com> wrote:
>> Not this patch's fault, but I'm getting a bit tired seeing the above open
>> coded. How about adding a function that does the sleeping based on a
>> timestamptz and a ms interval?
> You mean in plugins, right? I don't recall seeing similar patterns in
> other code paths of backend. But I think that we can use something
> like that in timestamp.c then because we need to leverage that between
> two timestamps, the last failure and now():
> TimestampSleepDifference(start_time, stop_time, internal_ms);
> Perhaps you have something else in mind?
>
> Attached is an updated patch.
Actually I came with better than last patch by using a boolean flag as
return value of TimestampSleepDifference and use
TimestampDifferenceExceeds directly inside it.
Regards,
--
Michael

Вложения

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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: EvalPlanQual behaves oddly for FDW queries involving system columns
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: INSERT ... ON CONFLICT UPDATE and RLS