Re: files under pg_clog directories are missing

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: dbhandary(at)iii(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: files under pg_clog directories are missing
Date: 2010-09-18 01:37:23
Message-ID: 201009180137.o8I1bN404056@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dinesh Bhandary wrote:
> Hello Everybody -
>
> Due to hardware crash we ran into issues where some blocks were
> corrupted and some files were missing.
> I was able to get over the corrupted blocks ( errmsg - "invalid page
> header in block 12345 of realtion x") by setting
> zero_damaged_pages=0 and running vacuum afterwards. Now I am running
> into situations where pg_clog files are missing (errmsg - "could not
> open pg_clog/0D0D). I have a backup which is quite old ( considering
> this as a last resort). Is there any other way to fix this problem?

If those clog numbers are not in your usual range, it usually means the
row is corrupt and is referring to an corrupt xid number, so the row is
bad, not the clog files are missing.

>
> I also created empty blocks to fool postgres, but there are so many of
> these file missing I was wondering if there a better/faster way to fix
> this problem.

Seems you will have to clear those pages too somehow. I have seen it
done with dd.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Smith 2010-09-18 03:15:25 Re: question about HA in PG 9.0
Previous Message Dinesh Bhandary 2010-09-18 00:32:09 files under pg_clog directories are missing