X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 08FD3D1B170 for ; Tue, 29 Jun 2004 14:37:00 -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 12417-02 for ; Tue, 29 Jun 2004 17:36:52 +0000 (GMT) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id B4AD9D1B1B6 for ; Tue, 29 Jun 2004 14:36:49 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 5542975 for pgsql-hackers@postgresql.org; Tue, 29 Jun 2004 10:38:31 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-hackers@postgresql.org Subject: Re: lock timeout patch Date: Tue, 29 Jun 2004 10:36:48 -0700 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200406291036.48477.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/975 X-Sequence-Number: 55525 Tom, > I'd accept a mechanism to enforce a timeout at the lock level if you > could show me a convincing use-case for lock timeouts instead of > statement timeouts, but I don't believe there is one. I think this > proposal is a solution in search of a problem. Hmmm ... didn't we argue this out with NOWAIT? What did we conclude then? I'm reluctant to go over old ground repeatedly. Let me say for myself that I would use this feature if it existed, but would not miss it a whole lot if the patch was rejected. Here's the idea: I have an OLAP database of regional office evaluations (in SQL Server, sadly) which requires that the evaluations, sometimes interlocking, of regions be "closed" simultaneously (in one transaction). This means that during the closure process, certain kinds of data entry needs to be frozen out. I am using SQL Server's lock timeout functionality for this; bascially, the data entry waits for 30 seconds, and then tells the user to try again in 10 minutes. I could do the same thing in PostgreSQL using NOWAIT and a loop on the client side. But the lock timeout is somewhat easier. -- Josh Berkus Aglio Database Solutions San Francisco