Re: Support for REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Support for REINDEX CONCURRENTLY
Date
Msg-id CAB7nPqTGox_5Njv9h8mLKXLeTOvtcsQvpK=PaPOQv3a1R0KnSg@mail.gmail.com
Whole thread Raw
In response to Re: Support for REINDEX CONCURRENTLY  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Support for REINDEX CONCURRENTLY  (Michael Paquier <michael.paquier@gmail.com>)
Re: Support for REINDEX CONCURRENTLY  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Wed, Oct 2, 2013 at 6:06 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I have pushed the first half of the first patch for now, revising it
> somewhat: I renamed the functions and put them in lmgr.c instead of
> procarray.c.
Great thanks.

> I think the second half of that first patch (WaitForOldSnapshots) should
> be in index.c, not procarray.c either.  I didn't look at the actual code
> in there.
That's indexcmds.c in this case, not index.c.

> I already shipped Michael fixed versions of the remaining patches
> adjusting them to the changed API.  I expect him to post them here.
And here they are attached, with the following changes:
- in 0002, WaitForOldSnapshots is renamed to WaitForOlderSnapshots.
This sounds better...
- in 0003, it looks that there was an error for the obtention of the
parent table Oid when calling index_concurrent_heap. I believe that
the lock that needs to be taken for RangeVarGetRelid is not NoLock but
ShareUpdateExclusiveLock. So changed it this way. I also added some
more comments at the top of each function for clarity.
- in 0004, patch is updated to reflect the API changes done in 0002 and 0003.

Each patch applied with its parents compiles, has no warnings AFAIK
and passes regression/isolation tests. Working on 0004 by the end of
the CF seems out of the way IMO, so I'd suggest focusing on 0002 and
0003 now, and I can put some time to finalize them for this CF. I
think that we should perhaps split 0003 into 2 pieces, with one patch
for the introduction of index_concurrent_build, and another for
index_concurrent_set_dead. Comments are welcome about that though, and
if people agree on that I'll do it once 0002 is finalized.

Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Add use of asprintf()
Next
From: Amit Kapila
Date:
Subject: Re: Documentation for SET var_name FROM CURRENT