Re: BUG #16036: Segmentation fault while doing an update - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #16036: Segmentation fault while doing an update
Date
Msg-id CAH2-Wz=7a7NfrHDYofvrYvNdDFs=1GAzr+_ANRzpc-fLmi=hDg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16036: Segmentation fault while doing an update  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
On Fri, Oct 4, 2019 at 3:24 PM Andres Freund <andres@anarazel.de> wrote:
> I was under the assumption that it'd be deterministic who gets to
> continue with a speculative insertion, but that ain't so.

There is no heap_lock_tuple() style lock arbitration built in to
speculative insertions:

https://wiki.postgresql.org/wiki/UPSERT#Theoretical_lock_starvation_hazards

I do not consider this to be a problem.

> Peter, do you see an easy way around that? Do you consider that a
> problem? ISTM we ought to make this fair, but that doing so would
> require a bit bigger changes that we'd want to make in the backbranches?

It would also require formally defining "fair", which doesn't seem
straightforward to me. The MVCC snapshot is barely involved at all.

-- 
Peter Geoghegan



pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #16036: Segmentation fault while doing an update
Next
From: PG Bug reporting form
Date:
Subject: BUG #16041: Error shows up both in pgAdmin and in Ruby (pg gem) - Segmentation fault