From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.
Date: Thu, 05 Jan 2017 12:37:51 -0500
Message-ID: <6989.1483637871@sss.pgh.pa.us> (raw)
In-Reply-To: <E1cPBt9-0003R1-9h@gemulon.postgresql.org>
References: <E1cPBt9-0003R1-9h@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas <rhaas@postgresql.org> writes:
> 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.
While I have no objection to the patch as committed, I have to wonder
if this isn't papering over the underlying problem rather than solving it.
It seems like this direction means that there's no such thing as dynamic
registration of LWLock tranches and we should just give up on that concept
entirely. If we do want to preserve the concept, don't we need to fix the
pg_stat_activity code so it doesn't fail on tranches that aren't known
locally?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: tgl@sss.pgh.pa.us, rhaas@postgresql.org, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Fix possible crash reading pg_stat_activity.
In-Reply-To: <6989.1483637871@sss.pgh.pa.us>
References: <E1cPBt9-0003R1-9h@gemulon.postgresql.org> <6989.1483637871@sss.pgh.pa.us>
* 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