Re: Best practice when reindexing in production

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Best practice when reindexing in production
Дата
Msg-id CABUevEwTpY-212h0hQEWYhUvhCTGL-NtHJryackpOE8WXd_Oqg@mail.gmail.com
обсуждение исходный текст
Ответ на Best practice when reindexing in production  (Niels Kristian Schjødt <nielskristian@autouncle.com>)
Ответы Re: Best practice when reindexing in production  (Armand du Plessis <adp@bank.io>)
Re: Best practice when reindexing in production  (Niels Kristian Schjødt <nielskristian@autouncle.com>)
Список pgsql-performance
On Wed, May 29, 2013 at 8:24 AM, Niels Kristian Schjødt
<nielskristian@autouncle.com> wrote:
> Hi,
>
> I have a database with quite some data (millions of rows), that is heavily updated all the time. Once a day I would
liketo reindex my database (and maybe re cluster it - don't know if that's worth it yet?). I need the database to be
usablewhile doing this (both read and write). I see that there is no way to REINDEX CONCURRENTLY - So what approach
wouldyou suggest that I take on this? 

If you have the diskspaec, it's generally a good idea to do a CREATE
INDEX CONCURRENTLY, and then rename the new one into place (typically
in a transaction). (If your app, documentation or dba doesn't mind the
index changing names, you don't need to rename of course, you can just
drop the old one).


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


В списке pgsql-performance по дате отправления:

Предыдущее
От: Niels Kristian Schjødt
Дата:
Сообщение: Best practice when reindexing in production
Следующее
От: Armand du Plessis
Дата:
Сообщение: Re: Best practice when reindexing in production