Re: pg_dumpall failing from possible corrupted shared memory - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dumpall failing from possible corrupted shared memory
Date
Msg-id 6114.1161963325@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dumpall failing from possible corrupted shared memory  (Richard Broersma Jr <rabroersma@yahoo.com>)
Responses Re: pg_dumpall failing from possible corrupted shared memory
List pgsql-general
Richard Broersma Jr <rabroersma@yahoo.com> writes:
> -[ RECORD 2 ]--+--------------------------
> indexrelid     | 604251
> indrelid       | 16737
> indnatts       | 1
> indisunique    | f
> indisprimary   | f
> indisclustered | f
> indkey         | 0
> indclass       | 2039
> indexprs       | ({FUNCEXPR :funcid 2020 :funcresulttype 1114 :funcretset false :funcformat 0
> :args ({CONST :consttype 25 :constlen -1 :constbyval false :constisnull false :constvalue 7 [ 7 0
> 0 0 100 97 121 ]} {VAR :varno 1 :varattno
> indpred        |

OK, there's your problem: somehow the value of 'indexprs' for this entry
has gotten truncated.  readfuncs.c is expecting another integer after
":varattno" and isn't checking for the possibility that pg_strtok()
returns NULL.  It would be interesting to find out exactly what happened
to the value, but I'm not sure there's anything much we can do to find
it out.  Are you interested in dumping out the page of pg_index that
contains this record, using pg_filedump?

In any case, my advice for recovering from the problem once you get
tired of investigating is to drop and recreate this index.  (If you're
not sure which one this is, "select 604251::regclass" would tell you.)

            regards, tom lane

pgsql-general by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Mailing list problem?
Next
From: Tom Lane
Date:
Subject: Re: plpython.so