From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Assert failure when rechecking an exclusion constraint |
Date: | 2011-06-05 19:09:13 |
Message-ID: | 24440.1307300953@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeff Davis <pgsql(at)j-davis(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2011-06-05 19:12:43 | Re: reducing the overhead of frequent table locks - now, with WIP patch |
Previous Message | Stefan Kaltenbrunner | 2011-06-05 19:04:23 | Re: reducing the overhead of frequent table locks - now, with WIP patch |