mgr inż. Jacek Bzdak <jbzdak@gmail.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?