Re: FATAL: could not open relation xxx: No such file or directory

From: "Mikko Partio" <mpartio(at)gmail(dot)com>
To: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: FATAL: could not open relation xxx: No such file or directory
Date: 2008-04-17 10:44:22
Message-ID: 2ca799770804170344o65291ce3pa56a2694f7a15bc5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Apr 17, 2008 at 1:36 PM, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
wrote:

> On Thu, Apr 17, 2008 at 3:38 PM, Mikko Partio <mpartio(at)gmail(dot)com> wrote:
>
> >
> > 2008-04-17 13:05:30 EEST [8435]: [32-1] ERROR: could not open relation
> > 1663/16386/359232: No such file or directory
> >
>
> Looks like a corrupt index to me. DId you try REINDEX on the table ?
>

Hi Pavan and thanks for your reply.

I tried to reindex the individual indexes in the table:

# reindex index xxx_idx;
ERROR: could not open relation 1663/16386/359232: No such file or directory

Since I thought the trouble may lie in the system catalogue indexes I issued
a REINDEX SYSTEM db, which went through with no errors. After that I tried
to remove indexes from the table in question:

# drop index xxx_idx;
ERROR: could not read block 0 of relation 1663/16386/2673: read only 0 of
8192 bytes

Hmm.. this is a different oid

# select 2673::regclass;
regclass
--------------------------
pg_depend_depender_index
(1 row)

But I just reindexed it!

# reindex table pg_depend;
WARNING: could not remove relation 1663/16386/2673: No such file or
directory
REINDEX

When I fire pg_dump to take a last minute backup I see this error:

pg_dump: Error message from server: ERROR: could not open relation
1663/16386/544529: No such file or directory
pg_dump: The command was: SELECT tgname, tgfoid::pg_catalog.regproc as
tgfname, tgtype, tgnargs, tgargs, tgenabled, tgisconstraint, tgconstrname,
tgdeferrable, tgconstrrelid, tginitdeferred, tableoid, oid,
tgconstrrelid::pg_catalog.regclass as tgconstrrelname from
pg_catalog.pg_trigger t where tgrelid = '294134'::pg_catalog.oid and
tgconstraint = 0

# reindex table pg_catalog.pg_trigger;
WARNING: could not remove relation 1663/16386/544529: No such file or
directory
REINDEX

Seems like the whole db is falling apart.

Regards

Mikko

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Achilleas Mantzios 2008-04-17 14:15:55 Re: Examining very large dumps
Previous Message Pavan Deolasee 2008-04-17 10:36:00 Re: FATAL: could not open relation xxx: No such file or directory