Re: pg_ctl promote wait

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl promote wait
Date: 2016-09-21 16:25:11
Message-ID: e2d97307-327c-dcf7-a692-30a41b0aa20e@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/11/16 9:28 AM, Michael Paquier wrote:
> I have looked at them and the changes are looking fine for me. So I
> have switched the patch as ready for committer, aka you.
>
> Just a nit:
> + if (wait_seconds > 0)
> + {
> + sleep(1);
> + wait_seconds--;
> + continue;
> + }
> This may be better this pg_usleep() instead of sleep().

Committed with that adjustment.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oskari Saarenmaa 2016-09-21 16:49:15 Re: Hash Indexes
Previous Message Peter Eisentraut 2016-09-21 16:24:21 pgsql: pg_ctl: Detect current standby state from pg_control