Re: Concurrently option for reindexdb - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Concurrently option for reindexdb
Date
Msg-id CAHGQGwHy_psbzCsWf5eFZ2rO=7CFoTzT=r+mPLj2n+CMdJQ5Mg@mail.gmail.com
Whole thread Raw
In response to Re: Concurrently option for reindexdb  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On Tue, Sep 2, 2014 at 1:06 PM, Craig Ringer <craig@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Immediate standby promotion
Next
From: Fujii Masao
Date:
Subject: Re: ALTER SYSTEM RESET?