pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleksii Kliukin <alexk@hintbits.com>
To: Álvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock
Date: Wed, 19 Jun 2019 15:08:31 +0100
Message-ID: <2A0C6E60-661D-47BB-888C-F557D4E7458A@hintbits.com> (raw)
In-Reply-To: <20190618222547.GA18769@alvherre.pgsql>
References: <20190618222547.GA18769@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> On 2019-Jun-18, Oleksii Kliukin wrote:
> 
>> Sorry, I was confused, as I was looking only at
>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=de87a084c0a5ac927017cd0834b33a932...
>> 
>> without taking your subsequent commit that silences compiler warnings at
>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3da73d6839dc47f1f47ca57974bf28e5a...
>> into consideration. With that commit, the danger is indeed in resetting the
>> skip mechanism on each jump and potentially causing deadlocks.
> 
> Yeah, I understand the confusion.
> 
> Anyway, as bugs go, this one seems pretty benign.  It would result in a
> unexplained deadlock, very rarely, and only for people who use a very
> strange locking pattern that includes (row-level) lock upgrades.  I
> think it also requires aborted savepoints too, though I don't rule out
> the possibility that there might be a way to reproduce this without
> that.
> 
> I pushed the patch again just now, with the new permutation.

Thank you very much for working on it and committing the fix!

Cheers,
Oleksii




view thread (32+ messages)

Message-ID: <2A0C6E60-661D-47BB-888C-F557D4E7458A@hintbits.com>
Permalink:  ../2A0C6E60-661D-47BB-888C-F557D4E7458A@hintbits.com/
Also on:    postgresql.org/message-id/2A0C6E60-661D-47BB-888C-F557D4E7458A@hintbits.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alexk@hintbits.com, alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock
  In-Reply-To: <2A0C6E60-661D-47BB-888C-F557D4E7458A@hintbits.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox