From: | Wes Palmer <wespvp(at)syntegra(dot)com> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to determine a database is intact? |
Date: | 2004-09-04 04:01:40 |
Message-ID: | BD5EA854.9197%wespvp@syntegra.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 9/3/04 10:14 AM, "Richard Huxton" <dev(at)archonet(dot)com> wrote:
> Put bluntly, you can't. The only way to verify the database as a whole
> is to check every single value in it. If actual values get corrupted
> then you may never even notice (e.g. a text field with a single
> character corrupted).
> However, if you dump and restore then three things can be guaranteed:
> 1. All values are valid for their type
> 2. All indexes are rebuilt
> 3. Constraints will be satisfied on all data.
> Is that good enough in your case?
No, a dump/reload isn't feasible. Right now, it takes about 24 hours to do
the actual pg_dumpall and reload. When the database peaks in size and
records start being aged out, multiply that by 4 (at least). Obviously,
this isn't a check you can do weekly.
I was hoping there might be a utility to scan the entire database for
consistency (something akin to running ANALYZE FULL). Obviously, that would
require accessing every row and every index value.
Wes
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-09-04 04:57:38 | Re: pl/pgsql exceptions |
Previous Message | Greg Stark | 2004-09-04 04:01:23 | Re: Ingres versus PostgreSQL |