pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Don't send protocol messages to a shm_mq that no longer exists.
3+ messages / 2 participants
[nested] [flat]
* pgsql: Don't send protocol messages to a shm_mq that no longer exists.
@ 2015-10-16 13:50 Robert Haas <rhaas@postgresql.org>
2015-10-16 13:52 ` Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists. Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Robert Haas @ 2015-10-16 13:50 UTC (permalink / raw)
To: 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(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Don't send protocol messages to a shm_mq that no longer exists.
2015-10-16 13:50 pgsql: Don't send protocol messages to a shm_mq that no longer exists. Robert Haas <rhaas@postgresql.org>
@ 2015-10-16 13:52 ` Robert Haas <robertmhaas@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2015-10-16 13:52 UTC (permalink / raw)
To: 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
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Don't send protocol messages to a shm_mq that no longer exists.
@ 2015-10-16 13:50 Robert Haas <rhaas@postgresql.org>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2015-10-16 13:50 UTC (permalink / raw)
To: 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
------
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2015-10-16 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 13:50 pgsql: Don't send protocol messages to a shm_mq that no longer exists. Robert Haas <rhaas@postgresql.org>
2015-10-16 13:52 ` Robert Haas <robertmhaas@gmail.com>
2015-10-16 13:50 pgsql: Don't send protocol messages to a shm_mq that no longer exists. Robert Haas <rhaas@postgresql.org>
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