Re: Assert failure when rechecking an exclusion constraint
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org
Date: 2011-06-05T19:09:13Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add an Assert that indexam.c isn't used on an index awaiting reindexing.
- d2f60a3ab055 9.1.0 cited
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 treated as 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