Re: Tracking database activity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Tracking database activity
Date: 2007-01-23 05:33:37
Message-ID: 10366.1169530417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones <erik(at)myemma(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-23 05:45:50 Re: too many trigger records found for relation "item" - what's that about??
Previous Message Bruno Wolff III 2007-01-23 05:11:41 Re: Password encryption method