Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 295679FA65C for ; Tue, 24 Oct 2006 22:11:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 95536-05 for ; Tue, 24 Oct 2006 22:10:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 66A989FA5D8 for ; Tue, 24 Oct 2006 22:10:56 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id C9EE4308E7; Wed, 25 Oct 2006 03:10:54 +0200 (MET DST) From: "Carlo Stonebanks" X-Newsgroups: pgsql.interfaces Subject: pg_exec commit causes extremely long delays Date: Tue, 24 Oct 2006 21:10:55 -0400 Organization: Hub.Org Networking Services Lines: 19 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 To: pgsql-interfaces@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.054 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/26 X-Sequence-Number: 6309 I have a TCL app which has severe delays - measured in tens of minutes at least - running "pg_exec $conn "commit". The delays are so long that I used to think the app was hopelessly frozen. By accident, I left the app alone in its frozen state and came back a good eal later and seen that it was running again. The application loops through an import file, reading one row at a time, and issues a bunch of inserts and updates to various tables. There's a simple pg_exec $conn "start transaction" at the beginning of the loop and the commit at the end. There are a minimum of four apps running at the same time, all reading different sections of the same table, all writing to the same db and the same tables. The other apps seem unaffected by the one app that freezes. Any thoughts on the cause and possible solutions would be appreciated. Carlo