Re: Assert failure when rechecking an exclusion constraint - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Assert failure when rechecking an exclusion constraint
Date
Msg-id 24440.1307300953@sss.pgh.pa.us
Whole thread Raw
In response to Re: Assert failure when rechecking an exclusion constraint  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Assert failure when rechecking an exclusion constraint
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch
Next
From: Heikki Linnakangas
Date:
Subject: Re: reducing the overhead of frequent table locks - now, with WIP patch