Postgres 9.1 statistics in pg_stat_database
It seems that pg_stat_database is thoroughly described in the manual.

As to the increasing xact_commit. You might be have AUTOCOMMIT=on. PostgreSQL will always run all your queries in a transaction. In case AUTOCOMMIT=on, COMMIT will issued after each statement executed.

In your case you have 2 statements:


previous SELECT * FROM pg_stat_database;
your test statement, like SELECT 1


You might try the following scenario:


open 2 sessions, S1 and S2;
S1: SET autocommit TO off;
S1: SELECT * FROM pg_stat_database;
S1: SELECT * FROM pg_stat_database;
S2: SELECT 1;
S1: SELECT * FROM pg_stat_database;
S2: SET autocommit TO off;
S2: SELECT 1;
S1: SELECT * FROM pg_stat_database;


You can continue playing around yourself.