X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 2E1EED1C92A for ; Tue, 29 Jul 2003 19:29:27 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 89337-08 for ; Tue, 29 Jul 2003 16:28:28 -0300 (ADT) Received: from davinci.ethosmedia.com (209-128-84-228.bayarea.net [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 236FBD1C91C for ; Tue, 29 Jul 2003 16:29:25 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3357919; Tue, 29 Jul 2003 12:29:38 -0700 Content-Type: text/plain; charset="iso-8859-2" From: Josh Berkus Organization: Aglio Database Solutions To: "Viorel Dragomir" , Subject: Re: transactions Date: Tue, 29 Jul 2003 12:28:13 -0700 User-Agent: KMail/1.4.3 References: <031a01c355fd$4f52d020$0600a8c0@fix.ro> In-Reply-To: <031a01c355fd$4f52d020$0600a8c0@fix.ro> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200307291228.13273.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/433 X-Sequence-Number: 14547 Viorel, > The problem is that my web browser hangs on this query and stays that way a > lot [like 30 minutes -- i forgot about it and after 30 minutes it was still > trying to open the result page] I think this is a problem inside one of the functions; either you have an endless loop, or you are doing a huge unindexed join operation or something similar. Enclosing the two functions inside a transaction by itself shouldn't cause a time-out. One thing that can mess things up vis-a-vis transactions: If you have a function which does a series of large cascading updates -- that is, the function uses the updated table from step #2 to perform step #3, and step #3 to do step #4, and each update is 1000's of rows -- then execution can really bog down due to the lack of VACUUMing between updates. However, you can't VACUUM without committing the transaction. Just in case, I'd suggest doing a VACUUM ANALYZE right before running your big transaction. -- Josh Berkus Aglio Database Solutions San Francisco