From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Wes <wespvp(at)syntegra(dot)com> |
Cc: | Tino Wildenhain <tino(at)wildenhain(dot)de>, Jan Wieck <JanWieck(at)yahoo(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to determine a database is intact? |
Date: | 2004-09-09 16:07:45 |
Message-ID: | 200409091607.i89G7j120940@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Believe it or not, we haven't gotten many requests for this feature,
partly because such corruption is so rare. Also, any checker isn't
going to find a change from "Baker" to "Faker" in a text field.
---------------------------------------------------------------------------
Wes wrote:
> On 9/4/04 5:28 PM, "Tino Wildenhain" <tino(at)wildenhain(dot)de> wrote:
>
> > Well, with such a huge database you probably should consider
> > different backup strategies, a filesystem with snapshot
> > support (XFS?) could help where you can copy a state of the database
> > at any time - so you can backup the database cluster without
> > stopping the postmaster. Also replication via slony could be
> > an option.
>
> Yes, we are looking into using file system snapshots. We are currently
> using primarily file system backups (shut down the DB, back up the file
> system). The problem we ran into was that we didn't have a specific point
> in time where we knew with absolute certainty the backed up database was
> good - snapshots would not help here.
>
> I ended up starting with a recent backup, and working backwards until I
> found one that wouldn't crash postmaster on a pg_dumpall. Rather than trust
> that there was no corruption in that version (data blocks might be good, but
> pg_dumpall doesn't test indexes), I did a pg_dumpall and reload.
>
> > The best tool to verify the backup is probably the postmaster
> > itself. I really doubt any other program would be smaller and
> > faster :)
>
> Not really... Postmaster won't tell you if a structure is bad until it
> stumbles on it and crashes (or politely reports an error). Just because
> postmaster comes up doesn't mean your database is good. As far as I know,
> there is no "verify database" command option on postmaster - postmaster
> won't fsck your database.
>
> Wes
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-09-09 16:28:08 | Re: MOVE doesn't return number of rows |
Previous Message | Tom Lane | 2004-09-09 16:02:14 | Re: [JDBC] ERROR: canceling query due to user request |