low transaction ID wrap limit

Started by Jeff Amielalmost 19 years ago2 messagesgeneral
Jump to latest
#1Jeff Amiel
jamiel@istreamimaging.com

Whenever I read the documentation on the transaction wraparound stuff,
my head spins with all the references to frozen xids and min/max ages.

When it comes down to it, my interpretation of the whole kaboodle is
...."run postgresql v8.1 or later and autovacuum, and you will not have
to deal with the wraparound issue."

I was looking at some logs this morning and spotted this on my backup
database

Jun 24 04:08:46 back-app-1 postgres[82445]: [2-1] pgsql 82445 LOG: transaction ID wrap limit is 41612954, limited by database "back"

That seemed like an awfully low number compared to the 1 or 2 billion that I have seen in other posts on the subject.

postgres=# SELECT datname, age(datfrozenxid) FROM pg_database;
datname | age
-----------+------------
postgres | 1073968236
back | 1079399370
template0 | 1657840460
template1 | 1078788693

postgres=# select * from pg_database;
datname | datdba | encoding | datistemplate | datallowconn | datconnlimit | datlastsysoid | datvacuumxid | datfrozenxid | dattablespace | datconfig | datacl
-----------+--------+----------+---------------+--------------+--------------+---------------+--------------+--------------+---------------+-----------+------------------
postgres | 10 | 0 | f | t | -1 | 10792 | 3268269560 | 2194527737 | 1663 | |
back | 10 | 0 | f | t | -1 | 10792 | 3268269655 | 2194527832 | 1663 | |
template0 | 10 | 0 | t | f | -1 | 10792 | 1610655513 | 1610655513 | 1663 | | {pgsql=CT/pgsql}
template1 | 10 | 0 | t | t | -1 | 10792 | 3268490000 | 2194754451 | 1663 | | {pgsql=CT/pgsql}
(4 rows)

Should I be worried?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jeff Amiel (#1)
Re: low transaction ID wrap limit

Jeff Amiel <jamiel@istreamimaging.com> writes:

I was looking at some logs this morning and spotted this on my backup
database

Jun 24 04:08:46 back-app-1 postgres[82445]: [2-1] pgsql 82445 LOG: transaction ID wrap limit is 41612954, limited by database "back"

Should I be worried?

No. It's just wrapped past 4 billion. The age(datfrozenxid) numbers
show you are in good shape; nothing particularly out-of-date except
template0, which doesn't need vacuuming anyway.

regards, tom lane