Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists. - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
Date
Msg-id CA+TgmobPbGJjGWvC9VcwiwhOMnpb_OgZxAxe9obkaE59Adgvrw@mail.gmail.com
Whole thread Raw
In response to pgsql: Don't send protocol messages to a shm_mq that no longer exists.  (Robert Haas <rhaas@postgresql.org>)
List pgsql-committers
On Fri, Oct 16, 2015 at 9:50 AM, Robert Haas <rhaas@postgresql.org> wrote:
> Don't send protocol messages to a shm_mq that no longer exists.
>
> Commit 2bd9e412f92bc6a68f3e8bcb18e04955cc35001d introduced a mechanism
> for relaying protocol messages from a background worker to another
> backend via a shm_mq.  However, there was no provision for shutting
> down the communication channel.  Therefore, a protocol message sent
> late in the shutdown sequence, such as a DEBUG message resulting from
> cranking up log_min_messages, could crash the server.  To fix, install
> an on_dsm_detach callback that disables sending messages to the shm_mq
> when the associated DSM is detached.

And of course that should have set client_min_messages.  Sigh.

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


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
Next
From: Robert Haas
Date:
Subject: pgsql: Transfer current command counter ID to parallel workers.