Re: Postgresql concern of effect of invalid index - Mailing list pgsql-bugs

From Matheus de Oliveira
Subject Re: Postgresql concern of effect of invalid index
Date
Msg-id CAJghg4+hQyp9NsScZsDa==joO+BXaTxZ3_KvYnQyr-CP8razqw@mail.gmail.com
Whole thread Raw
In response to Postgresql concern of effect of invalid index  ("Burgess, Freddie" <FBurgess@Radiantblue.com>)
Responses Re: Postgresql concern of effect of invalid index
List pgsql-bugs
On Fri, Aug 22, 2014 at 10:27 PM, Burgess, Freddie <FBurgess@radiantblue.co=
m
> wrote:

> My question is? What are the ramifications of having this spatial indexes
> remain in this state?
>
> thanks
>
> update pg_index set indisvalid =3D false where indexrelid =3D
> 'sidx_sponser_report_y2014m06'::regclass;



If you marked it as invalid, then it is not going to be updated anymore. If
you want it to be used by some query down the road, you'll have to REINDEX
it, and REINDEX will take same time as building a new index. Can even be
worst, as it will lock the table, as there is not yet REINDEX CONCURRENTLY,
but there is CREATE INDEX CONCURRENTLY.

BTW, you'd better take this to -performance list and discuss about why it
is choosing a *bad* index instead of messing with the catalog.

Regards,
--=20
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br n=C3=ADvel F!
www.dextra.com.br/postgres

pgsql-bugs by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: PostgreSQL I/O bottleneck
Next
From: Kevin Grittner
Date:
Subject: Re: Postgresql concern of effect of invalid index