Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8FE459FB215 for ; Sat, 28 Oct 2006 13:12:34 -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 98971-03 for ; Sat, 28 Oct 2006 13:12:32 -0300 (ADT) X-Greylist: delayed 00:06:40.571598 by SQLgrey- Received: from web38906.mail.mud.yahoo.com (web38906.mail.mud.yahoo.com [209.191.125.112]) by postgresql.org (Postfix) with SMTP id C1B2B9FB1B8 for ; Sat, 28 Oct 2006 13:12:31 -0300 (ADT) Received: (qmail 13513 invoked by uid 60001); 28 Oct 2006 16:05:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=hWSZTB9xTPg9PcI6ERHRoF5auv9p0QgszgRtsG1/oDN2g5YROhhFMDEhZ2bl4PQTnTpueahwmlhsxMFmpJQWw0pLnrmg3U/C9slXq1d0uzIkmvZxFwznds2UguHJhcAahLh+chHa01WbBbUTozbcAURVthw+uk/3WUbJ1js0jSU= ; Message-ID: <20061028160550.13511.qmail@web38906.mail.mud.yahoo.com> Received: from [24.16.136.162] by web38906.mail.mud.yahoo.com via HTTP; Sat, 28 Oct 2006 09:05:50 PDT Date: Sat, 28 Oct 2006 09:05:50 -0700 (PDT) From: Brett Schwarz Subject: Re: pg_exec commit causes extremely long delays To: Carlo Stonebanks , pgsql-interfaces@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.355 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: *** X-Archive-Number: 200610/29 X-Sequence-Number: 6312 I do something similiar, but I don't see these delays. Do you have more det= ails about your circumstance? pgtcl version, PG version, how big the table = is, what kind of processing is being done in the script, etc. Have you trie= d simply debugging in the script to see where the bottleneck may lay? For e= xample, doing a simply puts with clock at various points in the script.=0A = =0A--brett=0A=0A----- Original Message ----=0AFrom: Carlo Stonebanks =0ATo: pgsql-interfaces@postgresql.org=0ASent: Tues= day, October 24, 2006 6:10:55 PM=0ASubject: [INTERFACES] pg_exec commit cau= ses extremely long delays=0A=0AI have a TCL app which has severe delays - m= easured in tens of minutes at =0Aleast - running "pg_exec $conn "commit".= =0A=0AThe delays are so long that I used to think the app was hopelessly fr= ozen. =0ABy accident, I left the app alone in its frozen state and came bac= k a good =0Aeal later and seen that it was running again. The application l= oops through =0Aan import file, reading one row at a time, and issues a bun= ch of inserts and =0Aupdates to various tables. There's a simple pg_exec $c= onn "start =0Atransaction" at the beginning of the loop and the commit at t= he end.=0A=0AThere are a minimum of four apps running at the same time, all= reading =0Adifferent sections of the same table, all writing to the same d= b and the =0Asame tables. The other apps seem unaffected by the one app tha= t freezes.=0A=0AAny thoughts on the cause and possible solutions would be a= ppreciated.=0A=0ACarlo =0A=0A=0A=0A---------------------------(end of broad= cast)---------------------------=0ATIP 6: explain analyze is your friend=0A= =0A=0A=0A=0A