Re: Postgresql concern of effect of invalid index

From: Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>
To: "Burgess, Freddie" <FBurgess(at)radiantblue(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Postgresql concern of effect of invalid index
Date: 2014-08-23 16:12:49
Message-ID: CAJghg4+hQyp9NsScZsDa==joO+BXaTxZ3_KvYnQyr-CP8razqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 22, 2014 at 10:27 PM, Burgess, Freddie <FBurgess(at)radiantblue(dot)com
> wrote:

> My question is? What are the ramifications of having this spatial indexes
> remain in this state?
>
> thanks
>
> update pg_index set indisvalid = false where indexrelid =
> '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,
--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Haribabu Kommi 2014-08-24 02:38:06 Re: [BUGS] BUG #9652: inet types don't support min/max
Previous Message Mark Kirkwood 2014-08-23 01:54:04 Re: PostgreSQL I/O bottleneck