Skip site navigation (1) Skip section navigation (2)

Re: vacuumdb not enough stack items

From: Decibel! <decibel(at)decibel(dot)org>
To: hjeancha(at)freesurf(dot)fr
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: vacuumdb not enough stack items
Date: 2008-06-21 17:50:50
Message-ID: 89B74A56-663D-4334-B5BE-B3E73617AA02@decibel.org (view raw or flat)
Thread:
Lists: pgsql-admin
On Jun 21, 2008, at 8:47 AM, hjeancha(at)freesurf(dot)fr wrote:
> i use postgresql version7.4.7 on i386-pc-linux-gnu, autovacuum is  
> configured to run on this database.
> But recently, we lost data for a database, we were able to connect  
> the database but we couldn't see any table anymore.
> I suspected a transaction ID wraparound, and to fix it, i just  
> imported data from a dump file.
> I tried to execute the following  query:
> SELECT datname, age(datfrozenxid) FROM pg_database where age 
> (datfrozenxid)<0;
> template1=# SELECT datname, age(datfrozenxid) FROM pg_database  
> where age(datfrozenxid)<0;
>                  datname                  |     age
> ------------------------------------------+-------------
>  template0                                |  -597653514
>  ez_info1                                 |  -205024652
>  XtDB                                     |  -205024658
>
>
> Does the negative value of age means that a transaction ID  
> wraparound has already occured?

That would be my guess.

> Doing a manual vacuumdb on each database raise an error message  
> saying:
> vacuumdb: vacuuming of database "ez_info1" failed: ERREUR:  not  
> enough stack items

That's probably a bug in vacuum, but even so, you'll want to re- 
initdb if you want to just pull back in from a pg_dump.

If you can take the downtime to do a pg_dump/restore, you should  
really upgrade to a more recent version. You'll get integrated  
autovacuum and code that makes wraparound impossible. I would not  
expect you to have any major code issues going to 8.0 or 8.1. Of  
course going to 8.3 would be better, but you could run into some  
compatibility issues. You'll get a performance gain to boot.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828


In response to

Responses

pgsql-admin by date

Next:From: hjeanchaDate: 2008-06-22 08:54:20
Subject: Re: vacuumdb not enough stack items
Previous:From: Tom LaneDate: 2008-06-21 16:37:16
Subject: Re: vacuumdb not enough stack items

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group