From: | mgr inż(dot) Jacek Bzdak <jbzdak(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Fwd: Problems with pg_stat_activity view |
Date: | 2013-11-02 22:28:52 |
Message-ID: | CA+FttVNCykpn3LoTy4pn3K6otGM6Pt87Dc31A0MrxriHkNkeuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I've checked my code and due other bug(s) indeed I had hangoing connections
from already dropped users.
Maybe just fix pg_stat_activity so it uses LEFT JOIN, to cover such case. I
guess it shouldnt break any code?
jb:)
2013/11/2 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> =?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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Hicks | 2013-11-03 00:49:45 | Re: BUG #8576: 'btree index keys must be ordered by attribute' |
Previous Message | Tom Lane | 2013-11-02 22:26:02 | Re: BUG #8576: 'btree index keys must be ordered by attribute' |