Re: Side effects of moving an index to a new tablespace

From: Ondrej Ivanič <ondrej(dot)ivanic(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Side effects of moving an index to a new tablespace
Date: 2012-01-09 23:49:09
Message-ID: CAM6mie+vcA=B54uqNNckJ-WcbL=ERW3NGoimCOb9ewK_5+Nd6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On 10 January 2012 09:16, Jason Buberel <jason(at)altosresearch(dot)com> wrote:
> We have lots of them, they are much smaller than the tables, and that will
> allow us to do the migrations more incrementally.

In your case I would keep data and indexes on different table spaces
(and lower random_page_cost).

> 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.

--
Ondrej Ivanic
(ondrej(dot)ivanic(at)gmail(dot)com)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-01-09 23:56:18 Re: How do you change the size of the WAL files?
Previous Message Jason Buberel 2012-01-09 22:16:18 Side effects of moving an index to a new tablespace