X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D72899FA68D for ; Sun, 23 Jul 2006 12:28:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 17586-07 for ; Sun, 23 Jul 2006 15:28:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.enyo.de (mail.enyo.de [212.9.189.167]) by postgresql.org (Postfix) with ESMTP id 9EBAA9FA2A7 for ; Sun, 23 Jul 2006 12:28:44 -0300 (ADT) Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by mail.enyo.de with esmtp id 1G4fsd-0001OZ-BA; Sun, 23 Jul 2006 17:28:31 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.62) (envelope-from ) id 1G4fsa-0004Vv-RP; Sun, 23 Jul 2006 17:28:28 +0200 From: Florian Weimer To: Martin Marques Cc: Alvaro Herrera , pgsql-sql@postgresql.org Subject: Re: Rows with exclusive lock References: <20060722144218.GH5125@surnet.cl> Date: Sun, 23 Jul 2006 17:28:28 +0200 In-Reply-To: (Martin Marques's message of "Sat, 22 Jul 2006 11:55:38 -0300 (ART)") Message-ID: <87fygss5lv.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200607/289 X-Sequence-Number: 25863 * Martin Marques: >> That's what SELECT FOR UPDATE does. > > Hi Alvaro, > > After the SELECT FOR UPDATE other transactions can still see the > locked rows. I want a read/write lock, so no one can access does rows. You should probably run the other transactions at SERIALIZABLE level. I suppose this will make them wait for the completion of the update.