Jeff Davis <pgsql@j-davis.com> writes:
> On Sun, 2011-06-05 at 14:17 -0400, Tom Lane wrote:
>> Attached are two versions of a patch to fix this. The second one
>> modifies the code that tracks what's "pending" as per the above thought.
>> I'm not entirely sure which one I like better ... any comments?
> I think I'm missing something simple: if it's not in the pending list,
> what prevents systable_beginscan() from using it?
The test that uses is
/** ReindexIsProcessingIndex* True if index specified by OID is currently being reindexed,* or should be
treatedas invalid because it is awaiting reindex.*/
bool
ReindexIsProcessingIndex(Oid indexOid)
{return indexOid == currentlyReindexedIndex || list_member_oid(pendingReindexedIndexes, indexOid);
}
so once we've set the index as the currentlyReindexedIndex, there's
no need for it still to be in pendingReindexedIndexes.
(Arguably, this function should have been renamed when it was changed
to look at pendingReindexedIndexes too ...)
regards, tom lane