From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution.
Date: Fri, 12 Feb 2016 16:59:14 -0500
Message-ID: <17358.1455314354@sss.pgh.pa.us> (raw)
In-Reply-To: <1427.1455301014@sss.pgh.pa.us>
References: <E1aTrXw-0005kd-Nl@gemulon.postgresql.org>
<21023.1455200996@sss.pgh.pa.us>
<CA+TgmoYh2UycJAaW+UONuXJhThyRD_Eq_1xDbivROLLYaSfb2Q@mail.gmail.com>
<CA+TgmoYrakoJzjNm_QpAZ4wktTG=MbPVJZiKETGeeXWaQ1N=1Q@mail.gmail.com>
<14581.1455205343@sss.pgh.pa.us>
<20201.1455210279@sss.pgh.pa.us>
<24444.1455251654@sss.pgh.pa.us>
<CA+TgmoaV7Tjr4D2+JsW+bBSmnGo4GqgxqKLJ3D8CMr7=Ayhx0Q@mail.gmail.com>
<1427.1455301014@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> Instead, what I propose we do about this is to change isolationtester
> so that once it's decided that a given step is blocked, it no longer
> issues the is-it-waiting query for that step; it just assumes that the
> step should be treated as blocked. So all we need do for "backlogged"
> steps is check PQisBusy/PQconsumeInput. That both greatly reduces the
> number of is-it-waiting queries that are needed and avoids any flappy
> behavior of the answer.
Hmm, that seemed to work fine here, but the buildfarm is not very happy
with it, and on reflection I guess it's just moving the indeterminacy
somewhere else. If we check for completion of a given step, and don't
wait till it's either completed or known blocked, then we have a race
condition that can change the order in which completions are reported.
The fundamental problem I fear is that isolationtester is designed around
the assumption that only its own actions (query issuances) change the
state of the database. Trying to use it to test deadlock detection is
problematic because deadlock-breaking changes the DB state asynchronously.
I think what we have to do is revert that change and dumb down
deadlock-hard until it produces stable results even on the CLOBBER
critters. One thing that'd help is reducing the number of processes
involved --- AFAICS, testing an 8-way deadlock is not really any more
interesting than testing, say, 4-way, and that would halve the amount
of time isolationtester spends figuring out the state.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution.
In-Reply-To: <17358.1455314354@sss.pgh.pa.us>
References: <E1aTrXw-0005kd-Nl@gemulon.postgresql.org> <21023.1455200996@sss.pgh.pa.us> <CA+TgmoYh2UycJAaW+UONuXJhThyRD_Eq_1xDbivROLLYaSfb2Q@mail.gmail.com> <CA+TgmoYrakoJzjNm_QpAZ4wktTG=MbPVJZiKETGeeXWaQ1N=1Q@mail.gmail.com> <14581.1455205343@sss.pgh.pa.us> <20201.1455210279@sss.pgh.pa.us> <24444.1455251654@sss.pgh.pa.us> <CA+TgmoaV7Tjr4D2+JsW+bBSmnGo4GqgxqKLJ3D8CMr7=Ayhx0Q@mail.gmail.com> <1427.1455301014@sss.pgh.pa.us> <17358.1455314354@sss.pgh.pa.us>
* 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