Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure
Date
Msg-id 4D7604A0020000250003B5FC@gw.wicourts.gov
Whole thread Raw
In response to Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-bugs
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
> On 08.03.2011 02:37, YAMAMOTO Takashi wrote:

>> i got the following assertion failure. given that availableList
>> is not empty and SxactGlobalXminCount == 0, i guess it was raced
>> with ReleasePredicateLocks.
>
> Yeah, that's what it looks like. One backend calls
> RegisterSerializableTransaction() while all the serializablexact
> slots are in use. So it releases SerializableXactHashLock and
> calls SummarizeOldestCommittedSxact(). Before
> SummarizeOldestCommittedSxact() acquires
> SerializableFinishedListLock, another backend calls
> ReleasePredicateLocks(false), triggering cleanup of old predicate
> locks, and ClearOldPredicateLocks() clears all old locks. Now when
> SummarizeOldestCommittedSxact() finally gets the lock, it sees
> that there are no old transactions to summarize, and trips the
> assertion.
>
> I think we need to just treat an empty list as normal in
> SummarizeOldestcommittedSxact(), patch attached.

Looks good.  I suggest we get that one in before the alpha is cut.
Especially since Dan was able to hit that same assertion an hour
into DBT-2 testing, and didn't hit problems with this patch.

> Thanks for yet another excellent bug report!

Indeed!  I'm quite curious about the testing environment which is
finding these, and very much appreciate all the work to help in
making this feature so solid before we even hit an alpha release.

-Kevin

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATEROLE does not permit commenting on newly-created roles
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure