X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 56C35D1D7BE for ; Sun, 1 Feb 2004 21:17:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 09083-10 for ; Sun, 1 Feb 2004 17:16:12 -0400 (AST) Received: from icfed.net (relay.icfed.net [62.105.156.139]) by svr1.postgresql.org (Postfix) with ESMTP id 13503D1D391 for ; Sun, 1 Feb 2004 17:16:09 -0400 (AST) Received: from [10.0.20.160] (account voodoo@wenet.ru HELO voodoo-book.mshome.net) by icfed.net (CommuniGate Pro SMTP 4.1.8) with ESMTP id 34154; Mon, 02 Feb 2004 00:16:09 +0300 Date: Mon, 2 Feb 2004 00:14:23 +0300 From: Alexander Popkov X-Mailer: The Bat! (v1.62e) Reply-To: Alexander Popkov Organization: MCFR X-Priority: 3 (Normal) Message-ID: <55394977757.20040202001423@wenet.ru> To: pgsql-php@postgresql.org, Paul & Natalie T Subject: Re: LOCKing method in my situation? In-Reply-To: <401D5A61.9000509@shentel.net> References: <62364058618.20040201153901@wenet.ru> <401D5A61.9000509@shentel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/5 X-Sequence-Number: 2553 Hello Paul, Sunday, February 1, 2004, 10:58:25 PM, you wrote: PNT> Alexander: PNT> It sounds like a lock preventing concurrent writes would be your best PNT> bet. This would mean that only one instance of your script can be PNT> *changing* the table at one time, but it has no effect on transactions PNT> that only read from that. PNT> If I read the docs correctly: PNT> http://www.postgresql.org/docs/7.4/static/explicit-locking.html PNT> You want to obtain a ROW EXCLUSIVE lock, e.g., PNT> LOCK TABLE IN ROW EXCLUSIVE; Thanks! I am read this doc carefully. I am understand what i need: i need _any_ lock method, which conflicts along, but not conflict with ROW SHARE MODE (for working concurrent selects). I am choose IN SHARE UPDATE EXCLUSIVE MODE and test it on 3 pgsql consoles - it worked ;) Big thanks! -- Best regards, Alexander mailto:voodoo@wenet.ru