[HACKERS] Re: pg_ctl wait exit code (was Re: [COMMITTERS] pgsql: Additionaltests for subtransactions in recovery)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема [HACKERS] Re: pg_ctl wait exit code (was Re: [COMMITTERS] pgsql: Additionaltests for subtransactions in recovery)
Дата
Msg-id 8f118e72-6aec-e45c-5c3d-4e8bfce747fa@2ndquadrant.com
обсуждение исходный текст
Ответ на [HACKERS] pg_ctl wait exit code (was Re: [COMMITTERS] pgsql: Additional testsfor subtransactions in recovery)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы [HACKERS] Re: pg_ctl wait exit code (was Re: [COMMITTERS] pgsql: Additionaltests for subtransactions in recovery)  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 5/1/17 12:19, Peter Eisentraut wrote:
> On 4/27/17 08:41, Michael Paquier wrote:
>> +$node_slave->promote;
>> +$node_slave->poll_query_until('postgres',
>> +   "SELECT NOT pg_is_in_recovery()")
>> +  or die "Timed out while waiting for promotion of standby";
>>
>> This reminds me that we should really switch PostgresNode::promote to
>> use the wait mode of pg_ctl promote, and remove all those polling
>> queries...
> 
> I was going to say: This should all be obsolete already, because pg_ctl
> promote waits by default.
> 
> However: Failure to complete promotion within the waiting time does not
> lead to an error exit, so you will not get a failure if the promotion
> does not finish.  This is probably a mistake.  Looking around pg_ctl, I
> found that this was handled seemingly inconsistently in do_start(), but
> do_stop() errors when it does not complete.
> 
> Possible patches for this attached.
> 
> Perhaps we need a separate exit code in pg_ctl to distinguish general
> errors from did not finish within timeout?

I was going to hold this back for PG11, but since we're now doing some
other tweaks in pg_ctl, it might be useful to add this too.  Thoughts?

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [PATCH] doc: Fix typo
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Fix a typo in aclchk.c