Re: Postgres Server crashed

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Akash Kodibail" <akash(dot)kodibail(at)onmobile(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres Server crashed
Date: 2011-10-10 17:17:18
Message-ID: 4E92E24E0200002500041CCA@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

kash Kodibail <akash(dot)kodibail(at)onmobile(dot)com> wrote:

> Lately the postgres server crashed due to space constraints,

The very first thing to do is to copy the entire directory structure
for the database cluster to somewhere you can keep it safe until the
problem has been resolved. If you have not yet done so, I strongly
recommend that you do so before trying anything else for recovery.

> pg_control file got lost and the server wouldn't start.

"got lost"? It seems to me that it would be a Very Bad Thing if an
out of disk space situation allowed PostgreSQL to cause that.
Should we be looking for a bug, or is there a chance someone deleted
this in an attempt to free space? If the latter, is there any
chance that other files critical to data integrity were deleted,
like in the pg_xlog or pg_clog directories?

> Had a old pg_control file placed in $PGDATA/global/ path.
>
> I was able to start the server, however, the data seems to be a
> very old one (2011 Jan 07) (probably the time where pg_control I
> had pasted was last updated).

And normal maintenance may be viewing newer data as old, due to
transaction wrap-around from the old pg_control file, and removing
it as part of normal cleanup. So you may have destroyed some of
your more recent data by doing that.

> How do I recover the rest of the data?

Well, as I said above, start by trying to preserve whatever you have
now. After you've done that, please provide more information. We
don't even know what version of PostgreSQL you're talking about, for
example.

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

It's somewhat likely that you'll be best off going to your last
known good backup, assuming you've been doing regular backups.

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Akash Kodibail 2011-10-10 18:13:03 Re: Postgres Server crashed
Previous Message Akash Kodibail 2011-10-10 15:54:57 Postgres Server crashed