Vacuum return codes (vacuum as db integrity check?)

From: "Stephane Charette" <stephanecharette(at)telus(dot)net>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Vacuum return codes (vacuum as db integrity check?)
Date: 2002-11-04 22:54:05
Message-ID: 20021104225403.F32A4476434@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

General PostgreSQL administration question:

I'm trying to use "vacuumdb" as a way to perform a database integrity
check before starting my db-enabled application. I used to run it as
"vacuumdb foo" and if the return code was anything other than zero, I
knew the database was most likely hosed. (At which point I would
destroy everything and reload from backup.)

Now I've made a change and I find myself using the command "vacuumdb
-f foo" to perform a full vacuum. However, I've noticed that vacuum
full seems to return non-zero return values much more often. (Meaning
the database is corrupt?) Is this known? Are the possible return
values published somewhere without having to dig through all of the
source code?

(This is PostgrSQL v7.2 compiled for Linux, running on an older kernel
2.2.x.)

BTW -- is this the "right" thing to do for a database integrity check?
Is there a better way to do this than a vacuum?

Stephane Charette

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message ferdinan firmansyah 2002-11-05 01:26:51 Can't connect to PGSQL
Previous Message Adam Erickson 2002-11-04 20:49:32 Postgres over stand-alone disk array?