Re: Support for REINDEX CONCURRENTLY
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@2ndquadrant.com>,
Fujii Masao <masao.fujii@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Peter Eisentraut <peter_e@gmx.net>,
Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>
Date: 2013-10-02T04:16:06Z
Lists: pgsql-hackers
Attachments
- 20131002_0002_WaitForOlderSnapshots.patch (application/octet-stream) patch
- 20131002_0003_reindex_refactoring.patch (application/octet-stream) patch
- 20131002_0004_reindex_conc_core.patch (application/octet-stream) patch
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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Background worker processes
- da07a1e85651 9.3.0 cited
-
Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY.
- 3c84046490be 9.3.0 cited
-
Work around unportable behavior of malloc(0) and realloc(NULL, 0).
- 09ac603c36d1 9.3.0 cited
-
Properly set relpersistence for fake relcache entries.
- beb850e1d873 9.3.0 cited