Re: BUG #5952: SetRWConflict assertion failure - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #5952: SetRWConflict assertion failure
Date
Msg-id 4D9AEC7F020000250003C307@gw.wicourts.gov
Whole thread Raw
In response to Re: BUG #5952: SetRWConflict assertion failure  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: BUG #5952: SetRWConflict assertion failure  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> wrote:

> This patch looks reasonable, but I'm a bit concerned about the
> chunk immediately preceding the patched area.
>
> When we do this:
>
>     LWLockRelease(SerializableXactHashLock);
>     LWLockRelease(partitionLock);
>     LWLockRelease(SerializablePredicateLockListLock);
>     LWLockAcquire(partitionLock, LW_SHARED);
>     LWLockAcquire(SerializableXactHashLock, LW_SHARED);
>
> Don't we need to also reset nextpredlock to the head of the list?
> I'm assuming it's the partitionLock that's keeping the
> PREDICATELOCKs from bouncing out from under us, so if we release
> it, aren't we potentially point off into thin air?

I think you are right.  That sequence should be followed by a copy
of the same "nextpredlock = " statement that's just above.  Do you
want me to revise the patch or do you just want to take care of it
as part of the commit?

Thanks for catching that.

-Kevin

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5952: SetRWConflict assertion failure
Next
From: Robert Haas
Date:
Subject: Re: BUG #5952: SetRWConflict assertion failure