Re: DROP ROLE: how to detect active sessions?
От
Tom Lane
Тема
Re: DROP ROLE: how to detect active sessions?
Дата
Msg-id
27773.1287685132@sss.pgh.pa.us
Ответ на
DROP ROLE: how to detect active sessions? (Ken Lalonde)
Список
Дерево обсуждения
DROP ROLE: how to detect active sessions? Ken Lalonde <kenl@gap.ca>
Re: DROP ROLE: how to detect active sessions? Tom Lane <tgl@sss.pgh.pa.us>
Re: DROP ROLE: how to detect active sessions? Ken Lalonde <kenl@gap.ca>
Ken Lalonde writes: > Is there any way to determine if a given role has any active sessions? Not if you're using SET ROLE. pg_stat_activity will show you the login role names for active sessions. Do you really need SET ROLE rather than logging in with the appropriate username? There are going to be race conditions in any case, of course. Probably the best solution is to just not try to drop roles except when the system is idle. regards, tom lane
В списке pgsql-admin по дате отправления