Re: [HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-02-03 Thread Andres Freund
On 2015-02-03 22:17:22 +0200, Heikki Linnakangas wrote: > On 02/03/2015 08:54 PM, Andres Freund wrote: > >* Previously the patchset didn't handle SIGTERM while > > InteractiveBackend() was reading from the client. It did handle > > ctrl-c/d, but since getc() isn't interruptible and can't be rep

Re: [HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-02-03 Thread Heikki Linnakangas
On 02/03/2015 08:54 PM, Andres Freund wrote: * Previously the patchset didn't handle SIGTERM while InteractiveBackend() was reading from the client. It did handle ctrl-c/d, but since getc() isn't interruptible and can't be replaced with latches... The fix for that isn't super pretty:

[HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-31 Thread Noah Misch
On Thu, Jan 15, 2015 at 03:03:35AM +0100, Andres Freund wrote: > 0002: Use a nonblocking socket for FE/BE communication and block using > latches. > > Has previously been reviewed by Heikki. I think Noah also had a > look, although I'm not sure how close that was. Negligible. I

Re: [HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-31 Thread Andres Freund
On 2015-01-31 00:52:03 +0100, Heikki Linnakangas wrote: > On 01/15/2015 03:03 AM, Andres Freund wrote: > >0004: Process 'die' interrupts while reading/writing from the client socket. > > >+ * Check for interrupts here, in addition to > >secure_write(), > >+

Re: [HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-31 Thread Andres Freund
On 2015-01-30 18:59:28 +0100, Heikki Linnakangas wrote: > On 01/15/2015 03:03 AM, Andres Freund wrote: > >0004: Process 'die' interrupts while reading/writing from the client socket. > > > > This is the reason Horiguchi-san started this thread. > > >+ProcessClientWriteInterrupt(!

[HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-30 Thread Heikki Linnakangas
On 01/15/2015 03:03 AM, Andres Freund wrote: 0002: Use a nonblocking socket for FE/BE communication and block using latches. s/suceeds/succeeds/ 0004: Process 'die' interrupts while reading/writing from the client socket. +* Check for interrupts here, in addi

[HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-30 Thread Heikki Linnakangas
On 01/15/2015 03:03 AM, Andres Freund wrote: 0004: Process 'die' interrupts while reading/writing from the client socket. This is the reason Horiguchi-san started this thread. + ProcessClientWriteInterrupt(!port->noblock); ... +/* + * ProcessClientWriteInterrupt() - Pro

[HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-30 Thread Andres Freund
On 2015-01-30 09:29:59 -0500, Robert Haas wrote: > On Wed, Jan 14, 2015 at 9:03 PM, Andres Freund wrote: > > 0002: Use a nonblocking socket for FE/BE communication and block using > > latches. > > > > Has previously been reviewed by Heikki. I think Noah also had a > > look, altho

[HACKERS] Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)

2015-01-30 Thread Robert Haas
On Wed, Jan 14, 2015 at 9:03 PM, Andres Freund wrote: > 0002: Use a nonblocking socket for FE/BE communication and block using > latches. > > Has previously been reviewed by Heikki. I think Noah also had a > look, although I'm not sure how close that was. > > I think this c