Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1CFEF6334CB for ; Fri, 7 May 2010 10:52:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97591-10 for ; Fri, 7 May 2010 13:52:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from elitecore.com (mailhost.elitecore.com [203.88.135.194]) by mail.postgresql.org (Postfix) with ESMTP id 677FE633332 for ; Fri, 7 May 2010 10:52:25 -0300 (ADT) Received: (qmail 26277 invoked from network); 7 May 2010 13:52:23 -0000 Received: from router.elitecore.com (HELO [192.168.1.136]) (siddharth.shah@[203.88.135.193]) (envelope-sender ) by elitecore.com (qmail-ldap-1.03) with SMTP for ; 7 May 2010 13:52:23 -0000 Message-ID: <4BE41AE1.4010804@elitecore.com> Date: Fri, 07 May 2010 19:21:29 +0530 From: Siddharth Shah User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: ERROR: XX001 (Critical and Urgent) References: <4BE3C93C.70800@elitecore.com> <4BE3D0EF020000250003137D@gw.wicourts.gov> In-Reply-To: <4BE3D0EF020000250003137D@gw.wicourts.gov> Content-Type: multipart/alternative; boundary="------------010600040400040301070806" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/91 X-Sequence-Number: 34564 This is a multi-part message in MIME format. --------------010600040400040301070806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks Kevin. Yes, I installed 8.4.3 then I have found that DDL and DML statements were getting failed to execute in some distributions So that's why taken call for reindexing What can be the method to verify that it's a database corruption ? xdb=# \dt; ERROR: index "pg_class_relname_nsp_index" contains unexpected zero page at block 33 HINT: Please REINDEX it. xdb=# analyse verbose pg_class_relname_nsp_index; ANALYZE xdb=# \dt; ERROR: index "pg_class_relname_nsp_index" contains unexpected zero page at block 33 HINT: Please REINDEX it. xdb=# reindex index pg_class_relname_nsp_index; Now INDEXing taking High CPU and postgres baffled. I don't have any backup available, Is there any way to fix this ? Kevin Grittner wrote: > Siddharth Shah wrote: > > >> * fsync is off* >> > > If you are running the database with fsync off and there is any sort > of unusual termination, your database will probably be corrupted. I > recommend restoring from your last good backup. If you don't have > one, recovery is going to be painful; I recommend contracting with > one of the many companies which off PostgreSQL support. (I'm not > affiliated with any of them.) > > >> I have tried with making fsync on >> > > That may help prevent further corruption, but will do nothing to > help recover from the damage already done. > > >> Postgres Version : 8.4.3 (Migrated data from 8.4.1) >> > > What do you mean by that? You installed 8.4.3 and reindexed hash > indexes? > > >> What can be issue ? Is it issue coming after database table >> corruption >> > > Yes. > > >> Can fsync on can prevent such (corruption) scenarios ? >> > > Yes. > > -Kevin > --------------010600040400040301070806 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks Kevin.

Yes, I installed 8.4.3 then I have found that DDL and DML statements were getting failed to execute in some distributions
So that's why taken call for reindexing

What can be the method to verify that it's a database corruption ?  

xdb=# \dt;
ERROR:  index "pg_class_relname_nsp_index" contains unexpected zero page at block 33
HINT:  Please REINDEX it.
xdb=# analyse verbose pg_class_relname_nsp_index;
ANALYZE
xdb=# \dt;   
ERROR:  index "pg_class_relname_nsp_index" contains unexpected zero page at block 33
HINT:  Please REINDEX it.
xdb=# reindex index pg_class_relname_nsp_index;

Now INDEXing taking High CPU and postgres baffled.


I don't have any backup available, Is there any way to fix this ?


Kevin Grittner wrote:
Siddharth Shah <siddharth.shah@elitecore.com> wrote:
 
  
* fsync is off*
    
 
If you are running the database with fsync off and there is any sort
of unusual termination, your database will probably be corrupted.  I
recommend restoring from your last good backup.  If you don't have
one, recovery is going to be painful; I recommend contracting with
one of the many companies which off PostgreSQL support.  (I'm not
affiliated with any of them.)
 
  
I have tried with making fsync on
    
 
That may help prevent further corruption, but will do nothing to
help recover from the damage already done.
 
  
Postgres Version : 8.4.3 (Migrated data from 8.4.1)
    
 
What do you mean by that?  You installed 8.4.3 and reindexed hash
indexes?
 
  
What can be issue ? Is it issue coming after database table
corruption
    
 
Yes.
 
  
Can fsync on can prevent such (corruption) scenarios ?
    
 
Yes.
 
-Kevin
  

--------------010600040400040301070806--