pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
Date: Fri, 16 Oct 2015 13:50:59 +0000
Message-ID: <E1Zn5PP-0008DH-HW@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/26981d292758c6ee9185332e4abc990ff19c81a2

Modified Files
--------------
src/backend/access/transam/parallel.c |    2 +-
src/backend/libpq/pqmq.c              |   28 ++++++++++++++++++++++++++--
src/backend/storage/ipc/shm_mq.c      |    9 +++++++++
src/include/libpq/pqmq.h              |    2 +-
src/include/storage/shm_mq.h          |    3 +++
5 files changed, 40 insertions(+), 4 deletions(-)


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


view thread (3+ messages)  latest in thread

Message-ID: <E1Zn5PP-0008DH-HW@gemulon.postgresql.org>
Permalink:  ../E1Zn5PP-0008DH-HW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Zn5PP-0008DH-HW@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
  In-Reply-To: <E1Zn5PP-0008DH-HW@gemulon.postgresql.org>
  References: <E1Zn5PP-0008DH-HW@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox