Re: Recovering a messed-up database - Mailing list pgsql-general

From Tom Lane
Subject Re: Recovering a messed-up database
Date
Msg-id 1514.1179187962@sss.pgh.pa.us
Whole thread Raw
In response to Recovering a messed-up database  ("Reuven M. Lerner" <reuven@lerner.co.il>)
List pgsql-general
"Reuven M. Lerner" <reuven@lerner.co.il> writes:
> To make a long story short, I thought that the site administrator was
> making regular backups, and that I was running pg_dump every night.
> Unfortunately, neither assumption was quite right.  The administrator
> was using rsync to back things up, and accidentally reversed the
> parameters a few nights ago, thus wiping out the contents of our PGDATA
> directory.  Well, not *all* of PGDATA.  Among the things that were
> partly or completely saved are PGDATA/base.  But PGDATA/global, as well
> as pg_clog, pg_xlog, and so forth are completely gone.

You're hosed :-(.  Without pg_clog you can't trust any of the data
files, at least not for recently-modified data.  If it's possible to
rebuild without depending on the files you have, I'd definitely counsel
going that way.

            regards, tom lane

pgsql-general by date:

Previous
From: Matthew Terenzio
Date:
Subject: Re: Restarting postgres server
Next
From: "Dawid Kuroczko"
Date:
Subject: Performance issues of one vs. two split tables.