pgsql: Check interrupts during hot standby waits

Started by Simon Riggsalmost 9 years ago3 messages
#1Simon Riggs
simon@2ndQuadrant.com

Check interrupts during hot standby waits

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8ee3d6b859a18d7f7375ceb9e04d256eb18aaec

Modified Files
--------------
src/backend/storage/ipc/standby.c | 2 ++
1 file changed, 2 insertions(+)

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

#2Andres Freund
andres@anarazel.de
In reply to: Simon Riggs (#1)
Re: [COMMITTERS] pgsql: Check interrupts during hot standby waits

Hi,

On 2017-01-26 19:00:34 +0000, Simon Riggs wrote:

Check interrupts during hot standby waits

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8ee3d6b859a18d7f7375ceb9e04d256eb18aaec

Modified Files
--------------
src/backend/storage/ipc/standby.c | 2 ++
1 file changed, 2 insertions(+)

It seems that the actual fix here would be to replace the pg_usleep loop
with a latch wait.... Then we also don't need to needlessly loop, and
actually react promptly to signals.

Andres

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

#3Michael Paquier
michael.paquier@gmail.com
In reply to: Andres Freund (#2)
Re: [COMMITTERS] pgsql: Check interrupts during hot standby waits

On Fri, Jan 27, 2017 at 4:06 AM, Andres Freund <andres@anarazel.de> wrote:

Hi,

On 2017-01-26 19:00:34 +0000, Simon Riggs wrote:

Check interrupts during hot standby waits

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e8ee3d6b859a18d7f7375ceb9e04d256eb18aaec

Modified Files
--------------
src/backend/storage/ipc/standby.c | 2 ++
1 file changed, 2 insertions(+)

It seems that the actual fix here would be to replace the pg_usleep loop
with a latch wait.... Then we also don't need to needlessly loop, and
actually react promptly to signals.

For the record, a patch has been posted on the original thread:
/messages/by-id/CAB7nPqRNcd+FR=8_Lyb65jBcRPX+59hXobi5G-wf4fxRak_6gw@mail.gmail.com
--
Michael

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