Re: Recovery test failure for recovery_min_apply_delay on hamster

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Recovery test failure for recovery_min_apply_delay on hamster
Дата
Msg-id CAB7nPqTQXxrr79U7B7d2hfxbpVqdaSM3MjUV4C=3G1a58S2-aw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Recovery test failure for recovery_min_apply_delay on hamster  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Recovery test failure for recovery_min_apply_delay on hamster  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Wed, Mar 9, 2016 at 12:29 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Michael Paquier wrote:
>> After sleeping (best debugger ever) on that, actually a way popped up
>> in my mind, and I propose the attached, which refactors a bit 005 and
>> checks that the LSN position of master has been applied on standby
>> after at least the delay wanted. A maximum delay of 90s is authorized,
>> like poll_query_until.
>
> Hmm, okay, that's great.  A question: what happens if the test itself is
> slow and the servers are fast, and the test doesn't manage to run two
> iterations before the two seconds have elapsed?  This may happen on
> overloaded or slow servers, if you're unlucky.

Yes, a failure would happen. The same thought occurred to me during a
long flight. And this is why the previous patch was full of meh.

> I don't have any ideas on ensuring that we don't apply earlier than the
> given period at the moment.

Attached is one, which is based on timestamp values queried from the
standby server. We could use as well perl's localtime call to
calculate the time delay.
--
Michael

Вложения

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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: WIP: Upper planner pathification
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_ctl promote wait