From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Ondrej Ivanič <ondrej(dot)ivanic(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Side effects of moving an index to a new tablespace |
Date: | 2012-01-10 10:06:55 |
Message-ID: | CAL_0b1tCHZ=YCkj2J=feK1vNEHTepFjyyx-eJ7N3rLs9Wn8VGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2012/1/10 Ondrej Ivanič <ondrej(dot)ivanic(at)gmail(dot)com>:
>> One area where the documentation is not very detailed - What are the side
>> effects and/or constraints put in place while an index is being moved? I
>> assume that the index will not be available to the query planner/engine
>> during that time period. Are there other ways in which the table (and other
>> indices) are affected or locked?
>
> yes, you are right there is not too much about "alter index" locking
> in the docs. When I did this last time (PG 8.4) 'alter index' acquired
> 'ACCESS EXCLUSIVE' lock.
To avoid it I usually do CREATE INDEX ... TABLESPACE ... / DROP INDEX
... / ALTER INDEX ... RENAME ...
>
> --
> Ondrej Ivanic
> (ondrej(dot)ivanic(at)gmail(dot)com)
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2012-01-10 13:50:14 | Re: Time to move table to new tablespace |
Previous Message | John R Pierce | 2012-01-10 07:18:00 | Re: How do you change the size of the WAL files? |