strk wrote:
> JanWieck wrote:
>> strk wrote:
>>
>> > I get the following error when vacuuming a db or inserting
>> > a big value in a column of a toastable datatype (GEOMETRY).
>> >
>> > ERROR: Index pg_toast_8443892_index is not a btree
>> >
>> > My last action has been killing a psql that was getting
>> > mad about receiving too much input and beeping as hell
>> > (readline issue ?).
>>
>> You must have killed a lot more than your psql frontend to get that as a
>> result.
>
> really... I hit ^C at the psql terminal and
> kill -9 <psql_pid>
>
> The only other reason I can thing about is the data type text
> input function screwing pg internal pointers...
You mean the text input function did stomp over shared memory of the
buffer cache? That would be the first time I hear of this.
Could you please do
select oid as datoid from pg_database where datname = '<dbname>';
select A.relfilenode from pg_class A, pg_class B, pg_class C where C.relname = '<tablename>' and B.oid =
C.reltoastrelid and A.oid = B.reltoastidxid;
With that information, give us an
ls -l $PGDATA/base/<datoid>/<relfilenode>
This file is the toast tables index.
>
>>
>> >
>> > After that, I put the insert query I was trying to feed to
>> > psql in a file and sourced it... Bump! that error appeared.
>> >
>> > psql:B:477: ERROR: Index pg_toast_8443892_index is not a btree
>> >
>> > Line 477 is EOF...
>> >
>> > Vacuum does not solve this (as you can see in the first error message)
>> >
>> > Do you have any hint about how to fix this ?
>>
>> Try "reindex table <tablename>". If you really only lost that btree
>> index, that should do.
>
> gis=# reindex table test; -- this is the table I was trying to insert into
> WARNING: table "test" wasn't reindexed
Is there more information about why it wasn't reindexed in the
postmaster log?
> REINDEX
> gis=# reindex table pg_toast_8443892; -- this was an assuption I made
> ERROR: Relation "pg_toast_8443892" does not exist
> gis=# vacuum;
> ERROR: Index pg_toast_8443892_index is not a btree
> gis=#
>
> Where could this pg_toast_8443892_index reference be found ?
As you might guess from the second select above ...
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #