powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
768 stars 57 forks source link

List of databases is incomplete #18

Closed Victor-D closed 10 years ago

Victor-D commented 10 years ago

Hi,

When I log in the web UI as postgres superuser, I see a list of databases :

List of databases :

db1
db2
...
db8

But on the postgresql cluster I have more than 8 databases.

Regards

rjuju commented 10 years ago

Hi,

The UI will only show databases on which activity was collected. It's useless to display empty graphs on unused databases.

Regards.

Victor-D commented 10 years ago

Hi,

I am pretty sure other databases have pg_stats enabled too.

select count(datname) FROM pg_stat_database returns 32 databases, not 8.

Regards,

Victor

rjuju commented 10 years ago

pg_stat_database will return 1 row for every existing database, even if it has never been accessed or can't even be accessed (you should see template0 wich by default doesn't accept connection).

Also, even if your databases had previousactivity, PoWA will only track activity since it has been enabled.

Also, PoWA doesn't rely on pg_stats, only pg_stat_statements.

Regards.