Re: Tracking database activity - Mailing list pgsql-general

From Tom Lane
Subject Re: Tracking database activity
Date
Msg-id 10366.1169530417@sss.pgh.pa.us
Whole thread Raw
In response to Tracking database activity  (Erik Jones <erik@myemma.com>)
Responses Re: Tracking database activity
List pgsql-general
Erik Jones <erik@myemma.com> writes:
> ... I was previously under the impression that by
> tracking age(datfrozenxid) in pg_database over time I'd be able to know
> how many transactions were processed in a certain amount of time.
> However, I've seend that pg_stat_database.xact_commit +
> pg_stat_database.xact_rollback < pg_database.age(datfrozenxid) by a
> factor of as much as 6 for any given time frame.  Am I misunderstanding
> something here?  Where is the discrepancy coming from?

The age() calculation will produce a total transaction count across the
whole installation, not individual databases --- perhaps that's the
source of your confusion?

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: New US DST Rules & PostgreSQL
Next
From: Bruno Wolff III
Date:
Subject: Re: Password encryption method