Re: BUG #5914: locking error in heap_fetch

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "YAMAMOTO Takashi" <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5914: locking error in heap_fetch
Date: 2011-03-04 15:49:58
Message-ID: 4D70B5C6020000250003B48F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"YAMAMOTO Takashi" <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp> wrote:

> heap_fetch calls CheckForSerializableConflictOut without buffer
> locked. it ends up an assertion failure in
> SetBufferCommitInfoNeedsSave.
>
>
> diff --git a/src/backend/access/heap/heapam.c
> b/src/backend/access/heap/heapam.c
> index 7dcc601..89697f6 100644
> --- a/src/backend/access/heap/heapam.c
> +++ b/src/backend/access/heap/heapam.c
> @@ -1472,10 +1472,10 @@ heap_fetch(Relation relation,
> if (valid)
> PredicateLockTuple(relation, tuple);
>
> - LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
> -
> CheckForSerializableConflictOut(valid, relation, tuple,
buffer);
>
> + LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
> +
> if (valid)
> {
> /*

Thanks so much for all your SSI testing! And thanks for your
excellent diagnosis when you hit a problem! If you can think of any
portable tests we could add, please share.

-Kevin

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-03-04 16:41:33 Re: Possible regression: libpq + SSL aborts when user has no home directory
Previous Message Tom Lane 2011-03-04 14:55:35 Re: Possible regression: libpq + SSL aborts when user has no home directory