Re: Concurrently option for reindexdb

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Concurrently option for reindexdb
Date: 2014-09-02 07:21:23
Message-ID: CAHGQGwHy_psbzCsWf5eFZ2rO=7CFoTzT=r+mPLj2n+CMdJQ5Mg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 2, 2014 at 1:06 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> On 09/02/2014 11:10 AM, Sawada Masahiko wrote:
>> The currently patch dose not hack catalog, just create new index
>> concurrently and
>> swap them.
>> So, It is supporting only UNIQUE index, I think.
>
> UNIQUE indexes, but not a UNIQUE constraint backed by a UNIQUE index, or
> a PRIMARY KEY constraint backed by a UNIQUE index.

You can use "ALTER TABLE ... DROP CONSTRAINT ... ADD PRIMARY KEY USING
INDEX ..."
for them. I'm not sure how to rebuild the index which other object
like foreign key depends on, though.

>> This patch contains some limitation.
>> Also I'm thinking to implement to handle these cases.
>
> My understanding from the prior discussion is that any satisfactory
> solution to those problems would also make it possible to support
> REINDEX CONCURRENTLY natively.

Agreed. We will need to back to Sawada's proposal only when we fail to
apply REINDEX CONCURRENTLY patch again. I hope that will not happen.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2014-09-02 07:26:09 Re: ALTER SYSTEM RESET?
Previous Message Amit Kapila 2014-09-02 06:53:33 Re: Immediate standby promotion