Re: corrupted database?

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: corrupted database?
Date: 2001-04-18 18:42:26
Message-ID: 20010418134226.A24447@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 18, 2001 at 09:01:21PM +0300, P. A. Bagyenda wrote:
> I am in the middle of a rather nasty experience that I hope
> someone out there can help solve.
>
> My hard disk partition with the postgres data directory got
> full. I tried to shut down postgres so I could clear some
> space, nothing happened. So I did a reboot. On restart (after
> clearing some pg_sorttemp.XX files), I discovered that all my
> tables appear empty! When I check in the data directories of
> the databases, I see that the files for each table have data
> (they are still of the size as before).
>
> I've been running some experiments on another machine and
> notice that if I remove the pg_log file, databases seem to
> disappear (or data to become invisible). So I am guessing that
> postgres is looking in one place and deciding there is no
> data. Now I need to get my data of course! Any solutions?? My
> programming skills are generally very good so if it involves
> some code I'd have no problem. How do I get a dump of the raw
> data (saw copy-style output) from the table files? Please
> help!
>
> I am running v7.0.3 on linux kernel v2.2

i'm running debian potato (linux 2.2) with 7.0.3 as well--

<guess>

i had something similar once, so maybe this'll work for you
too...

1) stop postmaster (!).
2) move the data files aside. (rename xyz to _xyz_ for example)
3) restart postmaster.
4) recreate your schema. (you do have backups, hmm?)
maybe best to do it without indexes, i dunno...
5) stop postmaster.
6) move the new data files out of the way.
7) restore the names to your filled data files.
8) restart postmaster.

maybe.

</guess>

best of luck...

--
don't visit this page. it's bad for you. take my expert word for it.
http://www.salon.com/people/col/pagl/2001/03/21/spring/index1.html

will(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The BOFH 2001-04-18 18:56:40 SSL
Previous Message Tom Lane 2001-04-18 18:35:43 Re: 7.1 bug fix question