Re: pg_dumpall failing from possible corrupted shared memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: General PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dumpall failing from possible corrupted shared memory
Date: 2006-10-27 15:35:25
Message-ID: 6114.1161963325@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Broersma Jr <rabroersma(at)yahoo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-10-27 15:43:42 Re: pg_dumpall failing from possible corrupted shared memory
Previous Message Richard Broersma Jr 2006-10-27 15:30:14 Re: Mailing list problem?