Re: pg_inherits: not found, but visible [IT GETS WORSE] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_inherits: not found, but visible [IT GETS WORSE]
Date
Msg-id 21437.985152045@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_inherits: not found, but visible [IT GETS WORSE]  (Joel Burton <jburton@scw.org>)
List pgsql-hackers
Joel Burton <jburton@scw.org> writes:
> Yikes. It gets weirder.
> Fixed the pg_inherits problem, went back to my Zoping, trying to optimize
> some views, and during another run, get an error that trelclasspq, one of
> my tables, couldn't open.
> Trying this out in psql, I get the same error message--the file doesn't
> exist. And, getting the oid for the file, looked in the directory--and
> this file is gone too!

This does not seem good.  Just to clarify: in both cases, the pg_class
row for the table is still there, but the underlying Unix file is gone?

Barring major malfeasance from your kernel, it seems like Postgres must
be issuing a delete on the wrong file when you are doing something else.
This is particularly bizarre if you are just doing create/delete view,
because in 7.1 a view hasn't got any associated file, and so no unlink()
kernel call should be issued at all.

I would recommend that you try to narrow down the events leading up to
this --- in particular, keeping a postmaster log of queries issued (-d2)
seems like a good idea.

> I doubt the error is Zope *per se*,

Zope cannot be the culprit --- there is no API for deleting a table file
without deleting its pg_class entry ;-).  But it seems possible that
some peculiar pattern of queries that they issue could be triggering a
previously-unknown Postgres bug.

I will be out of town all day tomorrow, but please see what data you can
gather.  If you can create a reproducible failure case it'd be great...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Justin Clift
Date:
Subject: regression.diff wrong dir name
Next
From: Bruce Momjian
Date:
Subject: Re: libpqeasy cursor error after multiple calls