Vacuuming and template0

From: Alexander Stanier <alexander(dot)stanier(at)egsgroup(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Vacuuming and template0
Date: 2008-06-02 12:15:20
Message-ID: 4843E458.1090200@egsgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

We vacuum our live database every night. Recently we then got a message
saying that we should vacuum "template1", "postgres" and "mp_base" or
the server would shut down. I now understand this is necessary to guard
against transaction wrap around and we did the full vacuum on these
databases straight away. The message has now gone away. We did not,
however, vacuum template0 and I notice that the age on this database is
now negative:

mp_live=# select datname, datvacuumxid, datfrozenxid, age(datfrozenxid)
from pg_database;
datname | datvacuumxid | datfrozenxid | age
-----------+--------------+--------------+-------------
postgres | 2140511881 | 1070040079 | 1078428152
mp_live | 2140510678 | 1066768855 | 1081699376
template1 | 2140511881 | 1070047126 | 1078421105
template0 | 499 | 499 | -2146499564
mp_base | 2140511881 | 1070049511 | 1078418720
(5 rows)

Should we attempt to vacuum template0? I read a note somewhere saying
that you can't vacuum template0 and don't need to. Is this correct?

Are there any consequences of the XID for template0 wrapping round and
the "age" becoming negative?

The system seems to be running normally. We are running PostgreSQL
8.1.11 on Redhat 5.1.

Thank you in advance for any advice.

Regards,

--
Alex Stanier

E-Government Solutions Ltd
Email: alexander(dot)stanier(at)egsgroup(dot)com
www.egsgroup.com

This message has been scanned for malware by SurfControl plc. www.surfcontrol.com

Browse pgsql-admin by date

  From Date Subject
Next Message Filip Krška 2008-06-02 12:55:09 invalid page header in block 29 of relation "pg_type"
Previous Message Phillip Smith 2008-06-01 23:25:51 Re: End of Data test?