pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Stanier <alexander.stanier@egsgroup.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Vacuuming and template0
Date: Mon, 02 Jun 2008 13:15:20 +0100
Message-ID: <4843E458.1090200@egsgroup.com> (raw)

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.stanier@egsgroup.com
www.egsgroup.com



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



Message-ID: <4843E458.1090200@egsgroup.com>
Permalink:  ../4843E458.1090200@egsgroup.com/
Also on:    postgresql.org/message-id/4843E458.1090200@egsgroup.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alexander.stanier@egsgroup.com
  Subject: Re: Vacuuming and template0
  In-Reply-To: <4843E458.1090200@egsgroup.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