This patch fixes pg_stat_database which is broken since this commit: http://archives.postgresql.org/pgsql-committers/2005-05/msg00126.php Neilc forgot to add new db entry inicialization to pgstat_recv_bestart() when he removed it from pgstat_add_backend() function, which causes numbackends in pg_stat_database table to be allways zero.
This is my first patch for postgres so I hope I did it right.
Please ignore this email - it was sent when I wasn't subscribed and we already had discrussion here about this prob.