Re: Show dropped users' backends in pg_stat_activity

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: Show dropped users' backends in pg_stat_activity
Дата
Msg-id
20160427161012.GM13058@momjian.us
Ответ на
Список
Дерево обсуждения
Show dropped users' backends in pg_stat_activity Oskari Saarenmaa <os@ohmu.fi>
Re: Show dropped users' backends in pg_stat_activity Robert Haas <robertmhaas@gmail.com>
Re: Show dropped users' backends in pg_stat_activity Tom Lane <tgl@sss.pgh.pa.us>
Re: Show dropped users' backends in pg_stat_activity Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Show dropped users' backends in pg_stat_activity Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Show dropped users' backends in pg_stat_activity Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Show dropped users' backends in pg_stat_activity Robert Haas <robertmhaas@gmail.com>
Re: Show dropped users' backends in pg_stat_activity Tom Lane <tgl@sss.pgh.pa.us>
Re: Show dropped users' backends in pg_stat_activity Stephen Frost <sfrost@snowman.net>
Re: Show dropped users' backends in pg_stat_activity Tom Lane <tgl@sss.pgh.pa.us>
Re: Show dropped users' backends in pg_stat_activity Oskari Saarenmaa <os@aiven.io>
Re: Show dropped users' backends in pg_stat_activity Tom Lane <tgl@sss.pgh.pa.us>
Re: Show dropped users' backends in pg_stat_activity Bruce Momjian <bruce@momjian.us>
Re: Show dropped users' backends in pg_stat_activity Oskari Saarenmaa <os@ohmu.fi>
On Thu, Apr  7, 2016 at 11:22:08PM +0300, Oskari Saarenmaa wrote:
> 24.03.2016, 18:03, Tom Lane kirjoitti:
> >Robert Haas  writes:
> >>I am not really in favor of half-fixing this.  If we can't
> >>conveniently wait until a dropped role is completely out of the
> >>system, then I don't see a lot of point in trying to do it in the
> >>limited cases where we can.  If LEFT JOIN is the way to go, then,
> >>blech, but, so be it.
> >
> >I concur.  Let's put the left join(s) into those views and call it
> >good.
> >
> >BTW, I think we would need the left joins even if we had interlocking
> >in DROP, just to protect ourselves against race conditions.  Remember
> >that what pg_stat_activity shows is a snapshot, which might be more or
> >less out of date compared to the catalog contents.
> 
> Added my patch to the 2016-09 commitfest
> (https://commitfest.postgresql.org/10/601/) as a bug fix as I thought not
> showing all backends in pg_stat_activity is a bug.  Any chance to get it in
> 9.6?

Do we need a comment in the query explaining why a left join is needed,
e.g. "Use LEFT JOIN in case the role has been dropped"?  That wouldn't
be obvious to me.

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Daniel Verite
Дата:
FAQ