Re[2]: [HACKERS] Patch: add recovery_timeout option to control timeout of restore_command nonzero status code

From: Alexey Vasiliev <leopard_ne(at)inbox(dot)ru>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re[2]: [HACKERS] Patch: add recovery_timeout option to control timeout of restore_command nonzero status code
Date: 2015-01-05 13:39:28
Message-ID: 1420465168.828571151@f389.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mon, 5 Jan 2015 17:16:43 +0900 от Michael Paquier <michael(dot)paquier(at)gmail(dot)com>:
> On Wed, Dec 31, 2014 at 12:22 AM, Alexey Vasiliev <leopard_ne(at)inbox(dot)ru> wrote:
> > Tue, 30 Dec 2014 21:39:33 +0900 от Michael Paquier <michael(dot)paquier(at)gmail(dot)com>:
> > As I understand now = (pg_time_t) time(NULL); return time in seconds, what is why I multiply value to 1000 to compare with restore_command_retry_interval in milliseconds.
> This way of doing is incorrect, you would get a wait time of 1s even
> for retries lower than 1s. In order to get the feature working
> correctly and to get a comparison granularity sufficient, you need to
> use TimetampTz for the tracking of the current and last failure time
> and to use the APIs from TimestampTz for difference calculations.
>
> > I am not sure about small retry interval of time, in my cases I need interval bigger 5 seconds (20-40 seconds). Right now I limiting this value be bigger 100 milliseconds.
> Other people may disagree here, but I don't see any reason to put
> restrictions to this interval of time.
>
> Attached is a patch fixing the feature to use TimestampTz, updating as
> well the docs and recovery.conf.sample which was incorrect, on top of
> other things I noticed here and there.
>
> Alexey, does this new patch look fine for you?
> --
> Michael
>
>

Hello. Thanks for help. Yes, new patch look fine!

--
Alexey Vasiliev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-01-05 14:38:39 Re: add modulo (%) operator to pgbench
Previous Message Fujii Masao 2015-01-05 13:29:56 Re: [REVIEW] Re: Compression of full-page-writes