Thread: REINDEX needed because of index corruption need help ASAP
select count(*) FROM items_2004_07_29 as items WHERE true AND index @@ to_tsquery('default', '( audiovox)') ;
count
-------
4
(1 row)
count
-------
4
(1 row)
aers=# reindex index idx_title_2004_07_29;
REINDEX
aers=# select count(*) FROM items_2004_07_29 as items WHERE true AND index @@ to_tsquery('default', '( audiovox)') ;
count
-------
2342
(1 row)
REINDEX
aers=# select count(*) FROM items_2004_07_29 as items WHERE true AND index @@ to_tsquery('default', '( audiovox)') ;
count
-------
2342
(1 row)
Here are 2 searches using a gist index, the first one has a gist index which is not properly created but does not though an error in creation. After doing a few searches I noticed the numbers were way off so I reindexed. The problem was fixed and the search works properly.
Is there a problem with indexing? Do you know of this problem?
Is there a way to fix it?
We are getting this error for other index's including primary key indexs where we get OID page not found errors and the index corruption as posted above.
Sometimes when the index is broken it will cause run away searches which eat up all the memory and the server needs to be restarted.
Anyways this all looks to be in index problem, vacuum/analyze does not fix it only reindexing does.
Thank you,
Aaron
"borajetta" <borajetta@hotmail.com> writes: > We are getting this error for other index's including primary key indexs wh= > ere we get OID page not found errors and the index corruption as posted abo= > ve. > Sometimes when the index is broken it will cause run away searches which ea= > t up all the memory and the server needs to be restarted. It sounds to me like you have got hardware problems. Get out your memory and disk tests ... regards, tom lane
Aaron, > We are getting this error for other index's including primary key indexs where we get OID page not found errors and the index corruption as posted above. > Sometimes when the index is broken it will cause run away searches which eat up all the memory and the server needs to be restarted. What version of PostgreSQL are you using? Do you have frequent power-outs on the machine? Have you tested for bad hard drive, controller, or memory? Corruption of any kind on PostgreSQL is not normal. It's usually indicative of a hardware problem. -- -Josh Berkus "A developer of Very Little Brain" Aglio Database Solutions San Francisco