database corruption - Mailing list pgsql-hackers

From Joe Conway
Subject database corruption
Date
Msg-id 3F50DF26.9050303@joeconway.com
Whole thread Raw
Responses Re: database corruption
List pgsql-hackers
I received this from a friend:

Lance Rushing wrote:
> Something bad happened in Postgres.  I lost the ability to connect to the
> 'pegasus2' database.
> 
> i was doing some updates when I got an error, saying something about the
> backend dying...
> 
> When I restarted the database I could no longer connect to my database.  I
> can connect to the other databases, just not 'pegasus2'.

This is a 7.3.3 installation on Red Hat (9 I think).

I don't have any more detail yet on exactly what he was doing at this 
point, but I grabbed a copy of $PGDATA and looked at it on my own 
machine (since he doesn't have debug and assert support). Logging into 
any other database works fine, but the offending database produces this 
backtrace:

...
#85355 0x0817c0b5 in RelationBuildDesc (buildinfo=        {infotype = 2, i = {info_id = 135924865, info_name =
0x81a0c81
 
"pg_trigger"}}, oldrelation=0x0) at relcache.c:890
#85356 0x0817cf54 in RelationSysNameGetRelation (relationName=0x81a0c81 
"pg_trigger") at relcache.c:1591
#85357 0x0807c066 in relation_openr (sysRelationName=0x81a0c81 
"pg_trigger", lockmode=1) at heapam.c:550
#85358 0x0807c20a in heap_openr (sysRelationName=0x81a0c81 "pg_trigger", 
lockmode=1) at heapam.c:660
#85359 0x080d5872 in RelationBuildTriggers (relation=0x41ad740c) at 
trigger.c:720
#85360 0x0817c0b5 in RelationBuildDesc (buildinfo=        {infotype = 2, i = {info_id = 135924865, info_name =
0x81a0c81
 
"pg_trigger"}}, oldrelation=0x0) at relcache.c:890
#85361 0x0817cf54 in RelationSysNameGetRelation (relationName=0x81a0c81 
"pg_trigger") at relcache.c:1591
#85362 0x0807c066 in relation_openr (sysRelationName=0x81a0c81 
"pg_trigger", lockmode=1) at heapam.c:550
#85363 0x0807c20a in heap_openr (sysRelationName=0x81a0c81 "pg_trigger", 
lockmode=1) at heapam.c:660
#85364 0x080d5872 in RelationBuildTriggers (relation=0x41ad6b54) at 
trigger.c:720
#85365 0x0817c0b5 in RelationBuildDesc (buildinfo=        {infotype = 2, i = {info_id = 135924865, info_name =
0x81a0c81
 
"pg_trigger"}}, oldrelation=0x0) at relcache.c:890
...

i.e. it recurses itself to a horrible death.

Any ideas? Is this an indication that pg_trigger is corrupted?

Thanks,

Joe



pgsql-hackers by date:

Previous
From: Jonathan Gardner
Date:
Subject: Re: ALTER TABLE ... TO ... to change related names
Next
From: "Gaetano Mendola"
Date:
Subject: Re: SetVariable