Thanks for the updated patches!

> No, 0003 also changes the flush mode for the database KIND. All the fields 
> that
> I mentioned are inherited from relations stats and are flushed only at 
> transaction
> boundaries (so they don't appear in pg_stat_database until the transaction
> finishes). Does that make sense?

yes, I understand it clearly now.

But, the Note under pg_stat_database reads like this:

"All the statistics are updated while the transactions are in progress,
except for xact_commit, xact_rollback, tup_inserted, tup_updated
and tup_deleted that are updated only when the transactions finish."

But that is not true for all pg_stat_database fields, such as session_time,
active_time, idle_in_transaction_time, etc. From what I can tell some of their
fields are updated when the connection is closed. For example
in one session run "select pg_sleep(10)" and in another session monitor
pg_stat_database.active_time. That will not be updated until the session
is closed.

This is because these are not relation stats, which makes sense. The
Note section should elaborate more on this, right?

--
Sami Imseih
Amazon Web Services (AWS)


Reply via email to