Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, alexk(at)hintbits(dot)com
Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock
Date: 2019-06-15 03:43:37
Message-ID: 20190615034337.GA24560@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2019-Jun-14, Tom Lane wrote:

> I wrote:
> >> Hm, I don't get that warning. Does this patch silence it, please?
>
> > Uh, no patch attached? But initializing the variable where it's
> > declared would certainly silence it.
>
> BTW, after looking around a bit I wonder if this complaint isn't
> exposing an actual logic bug. Shouldn't skip_tuple_lock have
> a lifetime similar to first_time?

I think there are worse problems here. I tried the attached isolation
spec. Note that the only difference in the two permutations is that s0
finishes earlier in one than the other; yet the first one works fine and
the second one hangs until killed by the 180s timeout. (s3 isn't
released for a reason I'm not sure I understand.)

I don't think I'm going to have time to investigate this deeply over the
weekend, so I think the safest course of action is to revert this for
next week's set.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
with_s0.spec text/plain 1.6 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-06-15 16:25:39 Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock
Previous Message Alvaro Herrera 2019-06-14 22:27:12 pgsql: Add pg_dumpall --rows-per-insert

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-06-15 04:58:23 Re: Extracting only the columns needed for a query
Previous Message David Rowley 2019-06-15 03:28:05 Re: Speed up transaction completion faster after many relations are accessed in a transaction