X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9B04DD7D63 for ; Wed, 12 Oct 2005 11:51:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32557-07 for ; Wed, 12 Oct 2005 14:51:18 +0000 (GMT) Received: from natfrord.rzone.de (natfrord.rzone.de [81.169.145.161]) by svr1.postgresql.org (Postfix) with ESMTP id 5EBA1D7D46 for ; Wed, 12 Oct 2005 11:51:20 -0300 (ADT) Received: from [192.168.23.3] (F50a8.f.strato-dslnet.de [195.4.80.168]) (authenticated bits=0) by post.webmailer.de (8.13.1/8.13.1) with ESMTP id j9CEpOmK009453 for ; Wed, 12 Oct 2005 16:51:24 +0200 (MEST) Message-ID: <434D22E3.2000505@raygina.de> Date: Wed, 12 Oct 2005 14:51:15 +0000 From: Thomas Rokohl User-Agent: Thunderbird 1.4.1 (Windows/20051006) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: lock - feedback References: <434CEB1A.4050102@raygina.de> <434CF612.8010705@archonet.com> <434CFB5E.6000402@raygina.de> <434D0847.3080908@archonet.com> <434D0DF9.3010702@raygina.de> <434D1676.3010509@archonet.com> In-Reply-To: <434D1676.3010509@archonet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/63 X-Sequence-Number: 6165 Richard Huxton wrote: > Yes, but network timeouts will be of the order of several minutes - > hours. You're not holding your locks for that long are you? Are you > really saying your SELECT FOR UPDATE queries can take more than a > couple of seconds to complete? yes normally not, but it can happened. let something goes wrong, for example the network is busy or the db server is busy or something like that. if the number of request to a server is high enough it will be slow. whatever it isn't a certain event for locks. > All I'm saying is around "SELECT ... FOR UPDATE" you put two "SET > statement_timeout" to set a short timeout and then revert it. yes it is clear what you mean but it can also make trouble and a deadlock if the timeout is the short for the request. >> and it seems as if this should be a problem with postgres :-( > > Perhaps - you can apply NOWAIT to "LOCK TABLE" and I think in 8.1 to > "SELECT FOR UPDATE" also. That's not much use if you're stuck with 8.0 > for the moment though. It also doesn't actually change the logic of > the code above. i had read it and i had trouble with the beta so i us the stable version. but NOWAIT is a certain event for locks, the timeout isn't one.