From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix possible crash reading pg_stat_activity.
Date: Thu, 05 Jan 2017 17:31:43 +0000
Message-ID: <E1cPBt9-0003R1-9h@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix possible crash reading pg_stat_activity.
With the old code, a backend that read pg_stat_activity without ever
having executed a parallel query might see a backend in the midst of
executing one waiting on a DSA LWLock, resulting in a crash. The
solution is for backends to register the tranche at startup time, not
the first time a parallel query is executed.
Report by Andreas Seltenreich. Patch by me, reviewed by Thomas Munro.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/175ff6598e014b2fe84c06fa443161294fc2eed0
Modified Files
--------------
src/backend/executor/execParallel.c | 1 -
src/backend/storage/lmgr/lwlock.c | 2 ++
src/backend/utils/mmgr/dsa.c | 28 +++++++---------------------
src/include/utils/dsa.h | 5 ++---
4 files changed, 11 insertions(+), 25 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: Fix possible crash reading pg_stat_activity.
In-Reply-To: <E1cPBt9-0003R1-9h@gemulon.postgresql.org>
References: <E1cPBt9-0003R1-9h@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