pgsql: Don't send protocol messages to a shm_mq that no longer exists.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
Date: 2015-10-16 13:50:59
Message-ID: E1Zn5PP-0008DG-HR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2ad5c27bb565c26a4b12ea3343331c80f121f269

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

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-10-16 13:52:42 Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
Previous Message Tom Lane 2015-10-15 17:51:44 Re: Re: [COMMITTERS] pgsql: Have dtrace depend on object files directly, not objfiles.txt