Re: recent deadlock regression test failures

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: recent deadlock regression test failures
Date: 2017-04-08 03:31:00
Message-ID: CACjxUsOoFB+3K5UmiGEW3fhfaHJ9hb3YqWJ=+GWYGdLTReqMOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 7, 2017 at 9:24 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:

> 2. Did I understand correctly that it is safe to scan the list of
> SERIALIZABLEXACTs and access the possibleUnsafeConflicts list while
> holding only SerializableXactHashLock,

Yes.

> and that 'inLink' is the correct link to be following?

If you're starting from the blocked (read-only) transaction (which
you are), inLink is the one to follow.

Note: It would be better form to use the SxactIsDeferrableWaiting()
macro than repeat the bit-testing code directly in your function.

--
Kevin Grittner

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2017-04-08 04:09:13 Re: Remaining 2017-03 CF entries
Previous Message Kevin Grittner 2017-04-08 02:52:49 Re: [PATCH] Add GUCs for predicate lock promotion thresholds