Re: Problems with pg_stat_activity view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mgr inż(dot) Jacek Bzdak <jbzdak(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problems with pg_stat_activity view
Date: 2013-11-02 01:16:33
Message-ID: 22960.1383354993@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?ISO-8859-2?Q?mgr_in=BF=2E_Jacek_Bzdak?= <jbzdak(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message chris_prentice14 2013-11-02 08:46:22 BUG #8575: Issues with installing
Previous Message mgr inż. Jacek Bzdak 2013-11-02 00:17:59 Problems with pg_stat_activity view