Re: about pg_stat_get_db_xact_commit

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: abdelhak benmohamed <abdelhak(dot)benmohamed(at)yahoo(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: about pg_stat_get_db_xact_commit
Date: 2009-07-08 19:36:03
Message-ID: 20090708193603.GM5053@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

abdelhak benmohamed wrote:
> Hellow
> I like to track the number of committed transaction for my database
> So I use the following command
> Select pg_stat_get_db_xact_commit(16384)
>  
> (16384 is the oid of my database)
>  
> It gives me 35
>  
> But if I execute the same command another time, it gives me more than 35.
>  
> Between the first select and the second select I don’t execute transaction on my database
>  
> Please, can any one help me to understanding the cause of the change?

Maybe autovacuum running underneath committed some transactions. (Also,
each time you call the function it starts and commit a new transaction).

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2009-07-08 19:37:32 Re: Checkpoint Tuning Question
Previous Message Tim Keitt 2009-07-08 19:31:17 Overhead of union versus union all