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

From Fujii Masao
Subject Re: Support for REINDEX CONCURRENTLY
Date
Msg-id CAHGQGwEHaSFjLfH9Rrt1SZ5X3=2UAx_ZkyYkPSqRA=indz2jag@mail.gmail.com
Whole thread Raw
In response to Re: Support for REINDEX CONCURRENTLY  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Support for REINDEX CONCURRENTLY
List pgsql-hackers
On Wed, Jul 3, 2013 at 5:43 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Wed, Jul 3, 2013 at 5:22 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Why did you remove the check of indisvalid from the --binary-upgrade SQL?
>> Without this check, if there is the invalid toast index, more than one rows are
>> returned and ExecuteSqlQueryForSingleRow() would cause the error.
>>
>> +       foreach(lc, indexlist)
>> +               *toastidxs[i++] = index_open(lfirst_oid(lc), lock);
>>
>> *toastidxs[i++] should be (*toastidxs)[i++]. Otherwise, segmentation fault can
>> happen.
>>
>> For now I've not found any other big problem except the above.

system_views.sql
-    GROUP BY C.oid, N.nspname, C.relname, T.oid, X.oid;
+    GROUP BY C.oid, N.nspname, C.relname, T.oid, X.indexrelid;

I found another problem. X.indexrelid should be X.indrelid. Otherwise, when
there is the invalid toast index, more than one rows are returned for the same
relation.

> OK cool, updated version attached. If you guys think that the attached
> version is fine (only the reltoasyidxid removal part), perhaps it
> would be worth committing it as Robert also committed the MVCC catalog
> patch today. So we would be able to focus on the core feature asap
> with the 2nd patch, and the removal of AccessExclusiveLock at swap
> step.

Yep, will do. Maybe today.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Support for REINDEX CONCURRENTLY
Next
From: Alvaro Herrera
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])