Re: shm_mq fix for non-blocking mode - Mailing list pgsql-hackers

From Robert Haas
Subject Re: shm_mq fix for non-blocking mode
Date
Msg-id CA+TgmobT2m=cgNeiyR4+XQ_7MatWDdnPdoNMUweEz3HR9eS_tw@mail.gmail.com
Whole thread Raw
In response to shm_mq fix for non-blocking mode  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: shm_mq fix for non-blocking mode  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Oct 16, 2015 at 5:08 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> The shm_mq code handles blocking mode and non-blocking mode
> asymmetrically in a couple of places, with the unfortunate result that
> if you are using non-blocking mode, and your counterparty dies before
> attaching the queue, operations on the queue continue to return
> SHM_MQ_WOULD_BLOCK instead of, as they should, returning
> SHM_MQ_DETACHED.  The attached patch fixes the problem.  Thanks to my
> colleague Rushabh Lathia for helping track this down.
>
> (There's are some further bugs in this area outside the shm_mq code
> ... but I'm still trying to figure out exactly what they are and what
> we should do about them.  This much, however, seems clear-cut.)

...and so I've committed it and back-patched to 9.4.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: clearing opfuncid vs. parallel query
Next
From: Robert Haas
Date:
Subject: Re: clearing opfuncid vs. parallel query