16.03.2016, 17:48, Tom Lane kirjoitti:
Robert Haas <robertmh...@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:

Reply via email to