Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 585A62E00BB for ; Mon, 2 Jun 2008 10:03:24 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14181-03 for ; Mon, 2 Jun 2008 10:03:04 -0300 (ADT) X-Greylist: delayed 00:47:39.704837 by SQLgrey-1.7.6 Received: from cluster-j.mailcontrol.com (cluster-j.mailcontrol.com [86.111.223.190]) by developer.postgresql.org (Postfix) with ESMTP id 30D6A2E00BA for ; Mon, 2 Jun 2008 10:03:08 -0300 (ADT) Received: from jupiter.egsgroup.com (jupiter.egsgroup.com [195.224.231.134]) by rly45j.srv.mailcontrol.com (MailControl) with ESMTP id m52CFMAd009431 for ; Mon, 2 Jun 2008 13:15:22 +0100 Received: by jupiter.egsgroup.com (Postfix, from userid 65) id 6677F70E3; Mon, 2 Jun 2008 13:15:22 +0100 (BST) X-Scanned-By: MailControl A-08-50-03 (www.mailcontrol.com) on 10.74.0.155 X-Scanned-By: AMaViS-ng at egsgroup.com Received: from [10.20.0.98] (unknown [83.217.119.102]) by jupiter.egsgroup.com (Postfix) with ESMTP id 79AA8AF for ; Mon, 2 Jun 2008 13:15:21 +0100 (BST) Message-ID: <4843E458.1090200@egsgroup.com> Date: Mon, 02 Jun 2008 13:15:20 +0100 From: Alexander Stanier Organization: EGS Ltd User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: Vacuuming and template0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200806/4 X-Sequence-Number: 29342 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