pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Talha Khan <talha.amjad@gmail.com>
To: Sriram Dandapani <sdandapani@counterpane.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: transaction id wraparound
Date: Thu, 28 Sep 2006 11:58:12 -0700
Message-ID: <f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com> (raw)
In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF060E5A57@ca-mail1.cis.local>
References: <6992E470F12A444BB787B5C937B9D4DF060E5A57@ca-mail1.cis.local>

Hi sriram,

datfrozenxid column of pg_database row is updated at the completion of any
database wide vacuum operation. The value store here is the cuttoff xid used
by the vacuum operation all xid's older then this cutoffxid are replaced by
theis xid so i think the behaviour being shown by your database is quite
normal.

Regards
Talha Khan

The datfrozenxid column of a database's pg_database row is updated at the
completion of any database-wide VACUUM operation (i.e., VACUUM that does not
name a specific table). The value stored in this field is the freeze cutoff
XID that was used by that VACUUM command. All normal XIDs older than this
cutoff XID are guaranteed to have been replaced by FrozenXID within that
database


On 9/28/06, Sriram Dandapani <sdandapani@counterpane.com> wrote:
>
>  When I run this query
>
>
>
> fwdb01=# select current_timestamp,datname,age(datfrozenxid) from
> pg_database;
>
>               now              |  datname  |    age
>
> -------------------------------+-----------+------------
>
>  2006-09-28 18:04:24.489935+00 | postgres  | 1087834006
>
>  2006-09-28 18:04:24.489935+00 | fwdb01    | 2039254861
>
>  2006-09-28 18:04:24.489935+00 | template1 | 2039253122
>
>  2006-09-28 18:04:24.489935+00 | template0 | 1542808250
>
> (4 rows)
>
>
>
> fwdb01=# select current_timestamp,datname,age(datfrozenxid) from
> pg_database;
>
>              now              |  datname  |    age
>
> ------------------------------+-----------+------------
>
>  2006-09-28 18:10:45.64452+00 | postgres  | 1088357075
>
>  2006-09-28 18:10:45.64452+00 | fwdb01    | 2039777930
>
>  2006-09-28 18:10:45.64452+00 | template1 | 2039776191
>
>  2006-09-28 18:10:45.64452+00 | template0 | 1543331319
>
>
>
>
>
> In approximately 6 minutes, the fwdb01 count has gone up by about 500K. I
> am generating about 250K rows for every 6 . I am also running vacuumdb.
>
>
>
> Does vacuumdb generate a lot of transactions that affects this counter.
>

view thread (4+ messages)  latest in thread

Message-ID: <f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com>
Permalink:  ../f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com/
Also on:    postgresql.org/message-id/f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: talha.amjad@gmail.com, sdandapani@counterpane.com
  Subject: Re: transaction id wraparound
  In-Reply-To: <f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com>
  References: <6992E470F12A444BB787B5C937B9D4DF060E5A57@ca-mail1.cis.local> <f80885fc0609281158r49c039fdscb1f409fccf026b2@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox