From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Rare corruption of pg_class index |
Date: | 2006-12-20 18:27:29 |
Message-ID: | 20061220182729.GT30769@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Sabino Mullane wrote:
> I'm encountering some disconcerting problems on a 8.1.3 database.
> Very occasionally, I get a "could not open relation with OID xxx".
> This always occurs inside of a plpgsql function, and always refers
> to a normal, stable table that has not been dropped. The first
> time this occured, I reindexed the system indexes, but it has occured
> again, and on more than one database, which seems to lessen the chance
> of a hardware issue or a temporary index corruption issue. The functions
> in question are called many times, but the error only happens once in
> a blue moon. The last time it happened, the function ran with no problem
> one minute before the error, and again four minutes afterwards. The
> table name is hard-coded into the functions. This happens on average
> five times a day or so, on a very busy database (> 10M statements/day,
> the functions fire tens of thousands of times)
Well, if the error "fixed by itself" four minutes after the failure,
then it's not likely to be a corrupted index. My first guess would be
that there's some kind of race condition on the relcache or the sinval
mechanism.
It would help if you could get a stack trace at the moment of the
problem, but I'm not sure how to do that. Maybe cause the backend to
send a SIGSTOP to itself and then have an external program to quickly
launch GDB on it and get a backtrace, then send a SIGCONT.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Browne | 2006-12-20 18:38:26 | Re: Release 8.2.0 done, 8.3 development starts |
Previous Message | Jeff Davis | 2006-12-20 18:21:57 | Re: Rare corruption of pg_class index |