Re: Allow interrupts on waiting standby

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow interrupts on waiting standby
Date: 2017-01-27 12:23:16
Message-ID: CANP8+j+LEQeD0fzT=HBOoWHB3-0xRPgt=HeG7rk31VZgE8f-KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 January 2017 at 01:35, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
> On Fri, Jan 27, 2017 at 4:36 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> On 26 January 2017 at 19:20, Andres Freund <andres(at)anarazel(dot)de> wrote:

>>> 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.

>> 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.

So you think 2 calls to pg_usleep() can stay; my opinion is 3 can stay.

I'm not clear why this particular call is worthy, while dozens of
calls in other modules remain unchanged. This seems like a code issue
rather than anything to do with Hot Standby in particular, so it
should be another thread. Doesn't seem important compared to other
things for this release I should work on.

Please add to the next CF so it gets proper review.

--
Simon Riggs 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 Etsuro Fujita 2017-01-27 12:25:49 Re: Push down more full joins in postgres_fdw
Previous Message Alvaro Herrera 2017-01-27 12:22:06 Re: Failure in commit_ts tap tests