Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcPpP-0001Ee-7f for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Nov 2013 01:16:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VcPpO-0004nx-B7 for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Nov 2013 01:16:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcPpN-0004nq-Fo for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 01:16:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcPpL-0008NW-5A for pgsql-bugs@postgresql.org; Sat, 02 Nov 2013 01:16:37 +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 rA21GXZX022961; Fri, 1 Nov 2013 21:16:33 -0400 From: Tom Lane To: =?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= cc: pgsql-bugs@postgresql.org Subject: Re: Problems with pg_stat_activity view In-reply-to: References: Comments: In-reply-to =?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= message dated "Sat, 02 Nov 2013 01:17:59 +0100" Date: Fri, 01 Nov 2013 21:16:33 -0400 Message-ID: <22960.1383354993@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: > I guess (I have no idea really) that there is some bug in pg_stat_activity > view, because if I use function pg_stat_get_activity(NULL::integer) I will > get one connection. If you look at the definition of the pg_stat_activity view, you'll see it's just a join of pg_stat_get_activity's output against pg_database and pg_authid. It sounds like you had a row that had failed to join against pg_authid --- maybe you dropped a user that still had a running session? 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