Re: Another database recovery problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cjwhite(at)cisco(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Another database recovery problem
Date: 2003-10-31 00:38:57
Message-ID: 4665.1067560737@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Chris White (cjwhite)" <cjwhite(at)cisco(dot)com> writes:
> My 7.2.1 database was in the middle of inserting a large object when the
> power went down.

You really, really, really should be on 7.2.4 (if not 7.3.*). We don't
make dot-releases for amusement's sake --- there are some critical bug
fixes between 7.2.1 and 7.2.4, including some possibly relevant to your
problem.

> postgres: voicemail aesop 127.0.0.1 VACUUM: CRASH sql sql sql FATAL2:
> open of /data/sql/pg_clog/09C6 failed: No such file or directory

This looks like a corrupted page in (probably) pg_largeobject --- do you
get the same if you try, say, "select count(*) from pg_largeobject"?

> and from then on any time we try to connect we get a message saying
> database is in recovery mode and it never comes out. How can I recover
> this database or do I have to restore a prior backup?

I can't think of any reasonable fix in 7.2.* other than truncating
pg_largeobject, after which you'd need to reload the large objects
somehow. If you are lucky, the corruption doesn't affect any of the
valid data --- have you tried pg_dumping the database? A dump and
reload of the particular database would be the most reliable solution.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2003-10-31 01:56:21 Re: Logging query durations into another table in PostgreSQL
Previous Message Chris White (cjwhite) 2003-10-30 23:59:43 Another database recovery problem