Re: Fwd: Problems with pg_stat_activity view - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Fwd: Problems with pg_stat_activity view
Date
Msg-id 22710.1383447036@sss.pgh.pa.us
Whole thread Raw
In response to Fwd: Problems with pg_stat_activity view  (mgr inż. Jacek Bzdak <jbzdak@gmail.com>)
Responses Re: Fwd: Problems with pg_stat_activity view  (mgr inż. Jacek Bzdak <jbzdak@gmail.com>)
Re: Fwd: Problems with pg_stat_activity view  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
mgr inż. Jacek Bzdak <jbzdak@gmail.com> writes:
> Maybe just fix pg_stat_activity so it uses LEFT JOIN, to cover such case. I
> guess it shouldnt break any code?

Meh ... that would result in the usename column being possibly NULL,
which I bet applications aren't expecting either.  I'm not necessarily
against this, but I'm not sure it'll make things much better.
Anybody else have an opinion?

(Of course, the real fix would be to prevent dropping user IDs that
correspond to any live session, but that's not terribly easy either,
especially if you think about transient settings such as SET ROLE.
Overall I'm not convinced this is a case worth spending a lot of
effort on.)
        regards, tom lane



pgsql-bugs by date:

Previous
From: Peter Hicks
Date:
Subject: Re: BUG #8576: 'btree index keys must be ordered by attribute'
Next
From: mgr inż. Jacek Bzdak
Date:
Subject: Re: Fwd: Problems with pg_stat_activity view