Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code
Date
Msg-id CAB7nPqSbanVp6kFYnKXkqREJ_x5iuq4RSH9A6s-KuMk3w5VU0A@mail.gmail.com
Whole thread Raw
In response to Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Patch: add recovery_timeout option to control timeout of restore_command nonzero status code
List 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

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: EvalPlanQual behaves oddly for FDW queries involving system columns
Next
From: Dean Rasheed
Date:
Subject: Re: INSERT ... ON CONFLICT UPDATE and RLS