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 8B4B8D7D40 for ; Wed, 12 Oct 2005 10:22:16 -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 06057-01 for ; Wed, 12 Oct 2005 13:22:12 +0000 (GMT) Received: from natnoddy.rzone.de (natnoddy.rzone.de [81.169.145.166]) by svr1.postgresql.org (Postfix) with ESMTP id E8D8CD7C87 for ; Wed, 12 Oct 2005 10:22:10 -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 j9CDM9CM022837; Wed, 12 Oct 2005 15:22:10 +0200 (MEST) Message-ID: <434D0DF9.3010702@raygina.de> Date: Wed, 12 Oct 2005 13:22:01 +0000 From: Thomas Rokohl User-Agent: Thunderbird 1.4.1 (Windows/20051006) MIME-Version: 1.0 To: dev@archonet.com Cc: 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> In-Reply-To: <434D0847.3080908@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/58 X-Sequence-Number: 6160 Richard Huxton wrote: > Thomas Rokohl wrote: >> Richard Huxton wrote: >>> Thomas Rokohl wrote: >>>> hi, >>>> >>>> i have a short question and i don't find an answer is the archive. >>>> i'm using the odbc interface to the db and if i lock rows with >>>> SELECT FOR UPDATE and someone else try the same or >>>> try to read the rows, i will give him a feedback that he must wait >>>> or abort. >>>> The Problem is that the SELECT statement wait without feedback until >>>> the end of the world if the row is lock. >>> >>> Actually, it will timeout, and you can set that with PG's >>> configuration setting of "statement_timeout". See the "run-time >>> configuration" section of the manual for details. >>> >> first: thanks for your fast answer. >> >> if had found it in the manual but there is only a short clause about >> this topic: >> >> "Abort any statement that takes over the specified number of >> milliseconds. A value of zero (the default) turns off the limitation. " >> >> ( by the way in my config file is it set to zero by default and that >> means that it will be wait without a timeout. >> #statement_timeout = 0 # 0 is disabled, in milliseconds >> ) >> >> so but i'm not sure, doesn't it mean that all statements that take >> longer than this time will be abort? >> if it is so, that isn't a solution for this problem because than i >> can't make a "big" request anymore. > > You can change it during a session "set statement_timeout=2000" > yes, but that isn't a certain event that say that the data is locked! also the network for example can determine different timeouts. and also i don't know the working time for each request before. that isn't a solution for me. i will open a "please wait, while the data is locked" - window, if the data is locked. and it seems as if this should be a problem with postgres :-(