From: Oskari Saarenmaa <os@ohmu.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Show dropped users' backends in pg_stat_activity
Date: Thu, 17 Mar 2016 09:38:41 +0200
Message-ID: <56EA5F01.7040407@ohmu.fi> (raw)
In-Reply-To: <16068.1458143290@sss.pgh.pa.us>
References: <56E87CD8.60007@ohmu.fi>
<CA+TgmoabAtxUpdG7XX3fXoVZef=Miy6Q2=_Ng-nGCfvzBgdbkw@mail.gmail.com>
<16068.1458143290@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
16.03.2016, 17:48, Tom Lane kirjoitti:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Gee, I would have expected the DROP to be blocked until the user
>> disconnected, like we do for DROP DATABASE.
>
> Making that race-condition-free would require some notion of a lock on
> roles, I think. Seems pretty messy compared to the amount of actual
> value obtained. There are good reasons why you can't have a backend
> running in a nonexistent database; but a backend with a nonexistent
> user OID is not really going to be a problem for anything except
> monitoring queries that fail to use left joins where appropriate.
I don't think most people expect dropped users to be able to keep using
the database. If it's not feasible to block DROP ROLE until the user
has disconnected or to kill dropped users' sessions immediately after
they're dropped we should at least show their sessions in
pg_stat_activity and add a note about it in DROP ROLE docs.
/ Oskari
--
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-hackers@postgresql.org
Cc: os@ohmu.fi, tgl@sss.pgh.pa.us, robertmhaas@gmail.com
Subject: Re: Show dropped users' backends in pg_stat_activity
In-Reply-To: <56EA5F01.7040407@ohmu.fi>
References: <56E87CD8.60007@ohmu.fi> <CA+TgmoabAtxUpdG7XX3fXoVZef=Miy6Q2=_Ng-nGCfvzBgdbkw@mail.gmail.com> <16068.1458143290@sss.pgh.pa.us> <56EA5F01.7040407@ohmu.fi>
* 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