Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 779952E0044 for ; Tue, 26 Feb 2008 02:33:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97771-10 for ; Tue, 26 Feb 2008 02:33:09 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by postgresql.org (Postfix) with ESMTP id E6F9D2E0045 for ; Tue, 26 Feb 2008 02:33:08 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 28so1134858wff.28 for ; Mon, 25 Feb 2008 22:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=sYdjB4pR+IRt7/qdVlkgDcwZKFPptBtnb2Hw4lvW40U=; b=KapINNELKJ2rZplzpvNVQEKjbIZ8eDPwS+AFF9WHokryPUlUYJR9Z2oYDd7e5j4L/kduz/8a+SRW3/SwFBes7CwpSG9Y7pXiP6JQ31X6oHcf5J1u8H0bWyg9E4GIn8aLvCrj/+BYSIk+8BhMUaBjSyBx3ttTIgFFqnnBi+aQG2E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=RYc0w7BQ5N6c5CiQfKZLIjKnxc8ExgAaCx3aqZvsnFbIHcj/6VTO/qsgbEaphGxJWVxyOL9hxrY06QJXCiOj7iaHwMNKei8/mGguBP7BYhACAL/PBj4KQcjo09yZxyphiuhoHCGyR1iN1t62Cw5ynbhPR1ZIAvSsXqHr2N+kfKs= Received: by 10.142.240.9 with SMTP id n9mr3288970wfh.6.1204007588045; Mon, 25 Feb 2008 22:33:08 -0800 (PST) Received: by 10.142.231.18 with HTTP; Mon, 25 Feb 2008 22:33:07 -0800 (PST) Message-ID: Date: Tue, 26 Feb 2008 17:33:07 +1100 From: "Shoaib Mir" To: "Darren Reed" Subject: Re: How to reindex when unable to open relation? Cc: pgsql-admin@postgresql.org In-Reply-To: <47C3AE1F.2010804@fastmail.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4587_22010139.1204007588015" References: <47C3AE1F.2010804@fastmail.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/335 X-Sequence-Number: 28409 ------=_Part_4587_22010139.1204007588015 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Feb 26, 2008 at 5:13 PM, Darren Reed wrote: > Inserts into my table started generating an error message (see below), > and there was a log message that suggested I reindex. > > postgres seems to start and stop ok, but no operations on the tables > seem to work. > > l# /usr/pkg/bin/pg_dump -s -U postgres > pg_dump: failed sanity check, parent table OID 16401 of pg_rewrite entry > OID 16403 not found > > Is this recoverable without using a backup? > > Looks like to me corrupted system catalog! I guess when you dropped the table it didn't delete the record from pg_rewrite was not deleted when the parent table was dropped. So you can try doing something: delete from pg_rewrite where oid = 16403; And see if this can fix the problem.. -- Shoaib Mir Fujitsu Australia Software Technology shoaibm[@]fast.fujitsu.com.au ------=_Part_4587_22010139.1204007588015 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Feb 26, 2008 at 5:13 PM, Darren Reed <darrenr+postgres@fastmail.net> wrote:
Inserts into my table started generating an error message (see below),
and there was a log message that suggested I reindex.

postgres seems to start and stop ok, but no operations on the tables
seem to work.

l# /usr/pkg/bin/pg_dump -s -U postgres
pg_dump: failed sanity check, parent table OID 16401 of pg_rewrite entry
OID 16403 not found

Is this recoverable without using a backup?



Looks like to me corrupted system catalog!

I guess when you dropped the table it didn't delete the record from pg_rewrite was not deleted when the parent table was dropped. So you can try doing something:

delete from pg_rewrite where oid = 16403;

And see if this can fix the problem..

--
Shoaib Mir
Fujitsu Australia Software Technology
shoaibm[@]fast.fujitsu.com.au ------=_Part_4587_22010139.1204007588015--