create index concurrently - duplicate index to reduce time without an index

Поиск
Список
Период
Сортировка
Искать
От
Тема
create index concurrently - duplicate index to reduce time without an index
Дата
Msg-id
007DECE986B47F4EABF823C1FBB19C620102675196CD@exvic-mbx04.nexus.csiro.au
Список
Дерево обсуждения
create index concurrently - duplicate index to reduce time without an index <Gareth.Williams@csiro.au>
Re: create index concurrently - duplicate index to reduce time without an index Alvaro Herrera <alvherre@commandprompt.com>
Re: create index concurrently - duplicate index to reduce time without an index Szymon Guz <mabewlun@gmail.com>
Re: create index concurrently - duplicate index to reduce time without an index <Gareth.Williams@csiro.au>
Re: create index concurrently - duplicate index to reduce time without an index Greg Smith <greg@2ndquadrant.com>
Re: create index concurrently - duplicate index to reduce time without an index <Gareth.Williams@csiro.au>
Re: create index concurrently - duplicate index to reduce time without an index Greg Smith <greg@2ndquadrant.com>
Re: create index concurrently - duplicate index to reduce time without an index Alvaro Herrera <alvherre@commandprompt.com>
Re: create index concurrently - duplicate index to reduce time without an index Alban Hertroys <dalroi@solfertje.student.utwente.nl>
Re: create index concurrently - duplicate index to reduce time without an index Szymon Guz <mabewlun@gmail.com>
Re: create index concurrently - duplicate index to reduce time without an index <Gareth.Williams@csiro.au>
Re: create index concurrently - duplicate index to reduce time without an index Greg Smith <greg@2ndquadrant.com>
Re: create index concurrently - duplicate index to reduce time without an index Scott Marlowe <scott.marlowe@gmail.com>
Re: create index concurrently - duplicate index to reduce time without an index Alban Hertroys <dalroi@solfertje.student.utwente.nl>
Hi,

We want to reindex the database behind a production service without interrupting the service.

I had an idea for creating the index with a new name then dropping the existing index and renaming the new one - and it seems to work and would reduce the time without an index to be minimal.  I tried:
psql -d ICAT -c 'create unique index concurrently tmp_idx_objt_access1
on R_OBJT_ACCESS (object_id,user_id);'
# would check if that worked before proceeding #
psql -d ICAT -c 'drop index idx_objt_access1;'
psql -d ICAT -c 'alter index tmp_idx_objt_access1 rename to idx_objt_access1;'

But then a colleague pointed out that maybe the name of the index is not meaningful and this might not be any use.

Can any experts confirm the validity of this approach or shoot it down?

Thanks,

Gareth
В списке pgsql-general по дате отправления
От: Scott Marlowe
Дата:
От: Szymon Guz
Дата:
FAQ