From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Introduce group locking to prevent parallel processes from deadl
Date: Sat, 13 Feb 2016 13:32:01 -0500
Message-ID: <27041.1455388321@sss.pgh.pa.us> (raw)
In-Reply-To: <E1aSRBD-0006kV-CQ@gemulon.postgresql.org>
References: <E1aSRBD-0006kV-CQ@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Robert Haas <rhaas@postgresql.org> writes:
> Introduce group locking to prevent parallel processes from deadlocking.
I'm fairly unhappy about this patch, because it has introduced a large
amount of new complexity into the lock manager with effectively no
documentation. Yeah, there's several paragraphs added to lmgr/README,
but they're just a handwavy apologia for the high-level decision to allow
exclusive locks taken by parallel workers to not conflict. I see nothing
whatever explaining how it works, that is any useful docs about the new
data structures or invariants. For example, I can't figure out whether
you have broken the pg_locks display (by causing relevant lock state to
not get displayed, or get displayed in a useless fashion because one
can no longer tell which entries block which other entries). I can't
even tell for sure if it works at all: the README says only that locks
taken by members of the same parallel group don't conflict, but the
implementation looks more like some operations get applied to the group
leader rather than to followers, which is something completely different.
I got here because I thought it would be interesting to see if we could
improve on isolationtester's is-it-waiting query (as suggested by Andres)
by creating a backend function to return all the PIDs that a given PID is
waiting for. I thought this would be reasonably simple to do by crawling
the waitQueue for the lock it's blocked on. However, I can't figure out
what impact the group locking stuff has on that. Maybe I'm just too
stupid, but I prefer to believe this means the code is inadequately
documented.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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, rhaas@postgresql.org
Subject: Re: pgsql: Introduce group locking to prevent parallel processes from deadl
In-Reply-To: <27041.1455388321@sss.pgh.pa.us>
References: <E1aSRBD-0006kV-CQ@gemulon.postgresql.org> <27041.1455388321@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