Re: Support for REINDEX CONCURRENTLY
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Simon Riggs <simon@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2013-01-28T11:50:21Z
Lists: pgsql-hackers
On Mon, Jan 28, 2013 at 8:44 PM, Andres Freund <andres@anarazel.de> wrote: > > Another argument that would be enough for a rejection of this patch by a > > committer is the problem of invalid toast indexes that cannot be removed > up > > cleanly by an operator. As long as there is not a clean solution for > > that... > > I think that part is relatively easy to fix, I wouldn't worry too > much. > The more complex part is how to get tuptoaster.c to update the > concurrently created index. That's what I worry about. Its not going > through the normal executor paths but manually updates the toast > index - which means it won't update the indisready && !indisvalid > index... > I included in the patch some stuff to update the reltoastidxid of the parent relation of the toast index. Have a look at index.c:index_concurrent_swap. The particular case I had in mind was if there is a failure of the server during the concurrent reindex of a toast index. When server restarts, the toast relation will have an invalid index and this cannot be dropped by an operator via SQL. -- Michael Paquier http://michael.otacoo.com
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