Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 31AB2476681 for ; Mon, 4 Nov 2002 17:54:05 -0500 (EST) Received: from kelownamail.packeteer.com (unknown [64.251.67.69]) by postgresql.org (Postfix) with SMTP id F32A4476434 for ; Mon, 4 Nov 2002 17:54:03 -0500 (EST) Received: (qmail 31529 invoked from network); 4 Nov 2002 22:54:55 -0000 Received: from unknown (HELO scharette.packeteer.com) (172.16.2.86) by kelownamail.packeteer.com with SMTP; 4 Nov 2002 22:54:55 -0000 From: "Stephane Charette" To: "pgsql-admin@postgresql.org" Date: Mon, 04 Nov 2002 14:54:05 -0800 Reply-To: "Stephane Charette" X-Mailer: PMMail 2000 Standard (2.20.2502) For Windows 2000 (5.0.2195;2) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: Vacuum return codes (vacuum as db integrity check?) Message-Id: <20021104225403.F32A4476434@postgresql.org> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/47 X-Sequence-Number: 6235 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