Re: Show dropped users' backends in pg_stat_activity

Поиск
Список
Период
Сортировка
От Oskari Saarenmaa
Тема Re: Show dropped users' backends in pg_stat_activity
Дата
Msg-id 56EA5F01.7040407@ohmu.fi
обсуждение исходный текст
Ответ на Re: Show dropped users' backends in pg_stat_activity  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Pushdown target list below gather node (WAS Re: WIP: Upper planner pathification)
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [WIP] speeding up GIN build with parallel workers