Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 32E739FA231; Fri, 1 Dec 2006 14:43:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 59227-01; Fri, 1 Dec 2006 14:43:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) by postgresql.org (Postfix) with ESMTP id 26DE69FA12B; Fri, 1 Dec 2006 14:43:05 -0400 (AST) Received: from [209.162.219.253] (helo=dogma.v10.wvs) by servata.com with esmtpa (Exim 4.50) id 1GqDLf-0006dI-Sr; Fri, 01 Dec 2006 10:43:00 -0800 Subject: Re: [HACKERS] FOR SHARE vs FOR UPDATE locks From: Jeff Davis To: Tom Lane Cc: Michael Paesold , pgsql-hackers@postgreSQL.org, pgsql-docs@postgresql.org In-Reply-To: <11780.1164959219@sss.pgh.pa.us> References: <1144.1164924373@sss.pgh.pa.us> <456FD6D9.9020102@gmx.at> <11780.1164959219@sss.pgh.pa.us> Content-Type: text/plain Date: Fri, 01 Dec 2006 10:43:01 -0800 Message-Id: <1164998581.25371.13.camel@dogma.v10.wvs> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/1 X-Sequence-Number: 3924 On Fri, 2006-12-01 at 02:46 -0500, Tom Lane wrote: > Michael Paesold writes: > > Now seriously, isn't this a perfectly feasible scenario? E.g. the outer > > transaction acquires a shared lock because of foreign key constraints, and > > the sub transaction later wants to update that row? > > Yeah, it's not implausible. But the only way I can see to implement > that is to upgrade the outer xact's shared lock to exclusive, and that > doesn't seem real cool either. > If it's a plausible enough sequence of events, is it worth adding a note to the "migration" section of the release notes? Regards, Jeff Davis