Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vcnly-0006uC-4g for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Nov 2013 02:50:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vcnlx-0006xo-HB for pgsql-bugs@arkaria.postgresql.org; Sun, 03 Nov 2013 02:50:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vcnlw-0006xh-MG for pgsql-bugs@postgresql.org; Sun, 03 Nov 2013 02:50:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vcnlu-0001xL-DG for pgsql-bugs@postgresql.org; Sun, 03 Nov 2013 02:50:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rA32oadC022711; Sat, 2 Nov 2013 22:50:36 -0400 From: Tom Lane To: =?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= cc: pgsql-bugs@postgresql.org Subject: Re: Fwd: Problems with pg_stat_activity view In-reply-to: References: <22960.1383354993@sss.pgh.pa.us> Comments: In-reply-to =?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= message dated "Sat, 02 Nov 2013 23:28:52 +0100" Date: Sat, 02 Nov 2013 22:50:36 -0400 Message-ID: <22710.1383447036@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs