Skip site navigation (1) Skip section navigation (2)

Re: Please help - corrupt database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ertel, Steve" <Steve(dot)Ertel(at)infimatic(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Please help - corrupt database
Date: 2008-12-16 15:23:41
Message-ID: 29532.1229441021@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"Ertel, Steve" <Steve(dot)Ertel(at)infimatic(dot)com> writes:
> From the log files you can see that the backup does a REINDEX DATABASE db_name
> While this reindex is running, several other queries are running against the database wrapped in a BEGIN/COMMIT transaction.
> After the transaction query was issued, the log file provides the message NOTICE:  table "pg_class" was reindexed
> A few more queries run and then the log file provides the error message: ERROR:  could not find pg_class tuple for index 2663
 
> Is there anything that we can do to recover from this issue?

REINDEX DATABASE during active database operations is just asking for
trouble in 8.1 :-(.  There are race conditions that can be triggered
if another backend opens a reindexed index at the wrong time.

My advice is to stop doing the REINDEX DATABASE; I don't think that's
necessary or appropriate as a routine maintenance operation.  If you
insist on doing it, update to a recent 8.2.x or 8.3.x release, where
it should be reasonably safe.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Ertel, SteveDate: 2008-12-16 15:32:06
Subject: Re: Please help - corrupt database
Previous:From: Ertel, SteveDate: 2008-12-16 14:27:12
Subject: Please help - corrupt database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group