Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aVlLf-00083F-6W for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Feb 2016 19:31:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aVlLe-0006pQ-PQ for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Feb 2016 19:31:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVlLd-0006pJ-VP for pgsql-hackers@postgresql.org; Tue, 16 Feb 2016 19:31:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aVlLW-0007w6-U0 for pgsql-hackers@postgresql.org; Tue, 16 Feb 2016 19:31:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1GJVasq004951; Tue, 16 Feb 2016 14:31:36 -0500 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl In-reply-to: References: <27041.1455388321@sss.pgh.pa.us> <22842.1455474783@sss.pgh.pa.us> <30320.1455488783@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 15 Feb 2016 19:41:28 -0500" Date: Tue, 16 Feb 2016 14:31:36 -0500 Message-ID: <4950.1455651096@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > Yeah, you're right. Attached is a draft patch that tries to clean up > that and a bunch of other things that you raised. I've been reviewing this patch, and I had a question: why do we need to bother with a lockGroupLeaderIdentifier field? It seems totally redundant with the leader's pid field, ie, why doesn't BecomeLockGroupMember simply compare leader->pid with the PID it's passed? For some more safety, it could also verify that leader->lockGroupLeader == leader; but I don't see what the extra field is buying us. 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