Re: Concurrently option for reindexdb

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, 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-08-25 20:46:10
Message-ID: 539d0767-ea71-43bc-b2d1-effee5eee7d6@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On August 25, 2014 10:35:20 PM CEST, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>Michael Paquier wrote:
>> On Tue, Aug 26, 2014 at 3:48 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
>wrote:
>> > On Mon, Aug 25, 2014 at 4:33 PM, Sawada Masahiko
><sawada(dot)mshk(at)gmail(dot)com> wrote:
>> >> this might be difficult to call this as --concurrently.
>> >> It might need to be change the name.
>> >
>> > I'm OK to say that as --concurrently if the document clearly
>> > explains that restriction. Or --almost-concurrently? ;P
>> By reading that I am thinking as well about a wording with "lock",
>> like --minimum-locks.
>
>Why not just finish up the REINDEX CONCURRENTLY patch.

+many. Although I'm not sure if we managed to find a safe relation swap.

If not: How about adding ALTER INDEX ... SWAP which requires an exclusive lock but is fast and O(1)? Than all indexes can be created concurrently, swapped in a very short xact, and then dropped concurrently? 95% of all users would be happy with that and the remaining 5 would still be in a better position than today where the catalog needs to be hacked for that (fkeys, pkeys et al).

---
Please excuse brevity and formatting - I am writing this on my mobile phone.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-08-25 21:05:40 Re: Final Patch for GROUPING SETS
Previous Message Alvaro Herrera 2014-08-25 20:35:20 Re: Concurrently option for reindexdb