Re: Support for REINDEX CONCURRENTLY

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Support for REINDEX CONCURRENTLY
Date: 2013-03-10 05:18:43
Message-ID: CAB7nPqQXwXVqAQk_zF_OTmVmHcY7wViGb7YDRydmODh9MSVMHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Please find attached updated version. I also corrected the problem of the
query in pg_upgrade when fetching Oids of indexes of toast relation.

On Sun, Mar 10, 2013 at 3:48 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> I found the problem that the patch changed the behavior of
> ALTER TABLE SET TABLESPACE so that it moves also
> the index on the specified table to new tablespace. Per the
> document of ALTER TABLE, this is not right behavior.
>
Oops. Fixed in the patch attached. The bug was in the toastrelidxid patch,
not REINDEX CONCURRENTLY core.

> I think that it's worth adding new option for concurrent rebuilding
> into reindexdb command. It's better to implement this separately
> from core patch, though.
>
Yeah, agreed. It is not that much complicated. And this should be done
after this patch is finished.

You need to add the description of locking of REINDEX CONCURRENTLY
> into mvcc.sgml, I think.
>
OK, I added some reference to that in the docs. I also added a paragraph
about the lock used during process.

+ Rebuild a table concurrently:
> +
> +<programlisting>
> +REINDEX TABLE CONCURRENTLY my_broken_table;
>
OK... OK... Documentation should be polished more... I changed this
paragraph a bit to mention that read and write operations can be performed
on the table in this case.
--
Michael

Attachment Content-Type Size
20130310_1_remove_reltoastidxid_v5.patch application/octet-stream 39.6 KB
20130310_2_reindex_concurrently_v23.patch application/octet-stream 81.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-03-10 07:37:44 Re: odd behavior in materialized view
Previous Message Michael Paquier 2013-03-10 04:46:27 Re: Support for REINDEX CONCURRENTLY