Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TVV3z-00037k-F1 for pgsql-hackers@postgresql.org; Mon, 05 Nov 2012 22:22:35 +0000 Received: from acidenitrix.villemain.org ([91.121.90.165]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TVV3x-00086u-Ac for pgsql-hackers@postgresql.org; Mon, 05 Nov 2012 22:22:34 +0000 Received: from [89.157.243.130] (helo=Dimitris-MacBook-Air.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TVV3t-0002CM-LM; Mon, 05 Nov 2012 23:22:29 +0100 From: Dimitri Fontaine To: Alvaro Herrera Cc: Simon Riggs , Noah Misch , Kevin Grittner , Andres Freund , pgsql-hackers@postgresql.org Subject: Re: foreign key locks Organization: 2ndQuadrant References: <20121029121833.306930@gmx.com> <20121031193536.GA1651@tornado.leadboat.com> <20121031202209.GF23139@alvh.no-ip.org> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Mon, 05 Nov 2012 23:22:17 +0100 In-Reply-To: <20121031202209.GF23139@alvh.no-ip.org> (Alvaro Herrera's message of "Wed, 31 Oct 2012 17:22:10 -0300") Message-ID: User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/176 X-Sequence-Number: 216028 Alvaro Herrera writes: >> FOR NON KEY UPDATE >> FOR KEY UPDATE >> >> KEY is the default, so FOR UPDATE is a synonym of FOR KEY UPDATE > > Not really sure about the proposed syntax, but yes clearly we need some > other syntax to mean "FOR NON KEY UPDATE". I would rather keep FOR > UPDATE to mean what I currently call FOR KEY UPDATE. More proposals for > the other (weaker) lock level welcome (but if you love FOR NON KEY > UPDATE, please chime in too) FOR ANY UPDATE, synonym of FOR UPDATE FOR KEY UPDATE, optimized version, when it applies to your case I also tend to think that we should better not change the current meaning of FOR UPDATE and have it default to FOR ANY UPDATE. Unless it's easy to upgrade from ANY to KEY, and do that automatically at the right time, but I fear there lie dragons (or something). Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support