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

Re: [GENERAL] database corruption?

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Chris Jones <cjones(at)rightnowtech(dot)com>
Cc: Elmar(dot)Haneke(at)gmx(dot)de, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] database corruption?
Date: 2000-03-06 20:26:24
Message-ID: 38C41470.32800FF0@austin.rr.com (view raw or flat)
Thread:
Lists: pgsql-general
Chris Jones wrote:
> 
> Elmar(dot)Haneke(at)gmx(dot)de writes:
> 
> > Chris Jones schrieb:
> >
> > > NOTICE:  Index error_interface_idx: NUMBER OF INDEX' TUPLES (226766) IS NOT THE SAME AS HEAP' (226765)
> > > NOTICE:  Index error_ewhen_idx: NUMBER OF INDEX' TUPLES (226766) IS NOT THE SAME AS HEAP' (226765)
> > > NOTICE:  Index error_interface_idx: NUMBER OF INDEX' TUPLES (226766) IS NOT THE SAME AS HEAP' (226765)
> > > NOTICE:  Index error_ewhen_idx: NUMBER OF INDEX' TUPLES (226766) IS NOT THE SAME AS HEAP' (226765)
> >
> > The Index does not contain tuples having NULL in the indexed field.
> > You should check if you have an tuple containing NULL in your table.
> > If so remove or change the tuple or ignore the message.
> 
> Table    = error
> +----------------------------------+----------------------------------+-------+
> |              Field               |              Type                | Length|
> +----------------------------------+----------------------------------+-------+
> | id                               | int4 not null default nextval (  |     4 |
> | type                             | int2 not null                    |     2 |
> | ewhen                            | datetime not null                |     8 |
> | interface                        | varchar() not null               |    40 |
> | severity                         | varchar()                        |     5 |
> | extra                            | text                             |   var |
> +----------------------------------+----------------------------------+-------+
> Indices:  error_ewhen_idx
>           error_extra_idx
>           error_pkey
> 
> Since I wrote the original message, I've gotten rid of the "interface"
> index and added the "extra" index, but I haven't changed any of the
> columns in the table itself.  As you can see, they're declared as "not
> null."
> 
> Dropping and re-creating the indices made the warning go away, though.
> 
> In addition, I started getting this two nights ago:
> 
> NOTICE:  Index pg_class_relname_index: NUMBER OF INDEX' TUPLES (74) IS NOT THE SAME AS HEAP' (75)
> NOTICE:  Index pg_class_oid_index: NUMBER OF INDEX' TUPLES (74) IS NOT THE SAME AS HEAP' (75)

IIRC, I think the problem and solution is basically the same: 
corrupted index needing drop/rebuild.  Given they're system indices,
though, you may need to dump, destroydb, createdb, and reload.  Come
to think of it, these might possibly require initdb.  But maybe
someone with more pgsql experience here can confirm/correct that?

Cheers,
Ed Loehr

In response to

pgsql-general by date

Next:From: Alfred PerlsteinDate: 2000-03-06 20:29:49
Subject: Re: [GENERAL] DHCP and pg_hba.conf
Previous:From: Ron AtkinsDate: 2000-03-06 20:21:48
Subject: Re: [GENERAL] DHCP and pg_hba.conf

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