Re: [HACKERS] Allow interrupts on waiting standby

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Allow interrupts on waiting standby
Дата
Msg-id CAB7nPqRNcd+FR=8_Lyb65jBcRPX+59hXobi5G-wf4fxRak_6gw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Allow interrupts on waiting standby  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: [HACKERS] Allow interrupts on waiting standby  (Simon Riggs <simon@2ndquadrant.com>)
Re: [HACKERS] Allow interrupts on waiting standby  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Fri, Jan 27, 2017 at 4:36 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 26 January 2017 at 19:20, Andres Freund <andres@anarazel.de> wrote:
>> On 2017-01-26 12:24:44 -0500, Robert Haas wrote:
>>> On Thu, Jan 26, 2017 at 7:18 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>> > Currently a waiting standby doesn't allow interrupts.
>>> >
>>> > Patch implements that.
>>> >
>>> > Barring objection, patching today with backpatches.
>>>
>>> "today" is a little quick, but the patch looks fine.  I doubt anyone's
>>> going to screech too loud about adding a CHECK_FOR_INTERRUPTS() call.
>>
>> I don't quite get asking for agreement, and then not waiting as
>> suggested.  I'm personally fine with going with a CHECK_FOR_INTERRUPTS
>> for now, but I think it'd better to replace it with a latch.
>
> I have waited, so not sure what you mean. Tomorrow is too late.

This gives really little time for any feedback :(

> Replacing with a latch wouldn't be backpatchable, IMHO.
> I've no problem if you want to work on a deeper fix for future versions.

A deeper fix for HEAD proves to not be that complicated. Please see
the attached. The other two calls of pg_usleep() in standby.c are
waiting with 5ms and 10ms, it is not worth switching them to a latch.
-- 
Michael

-- 
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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] safer node casting
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size