pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brett Schwarz <brett_schwarz@yahoo.com>
To: Carlo Stonebanks <stonec.register@sympatico.ca>
To: pgsql-interfaces@postgresql.org
Subject: Re: pg_exec commit causes extremely long delays
Date: Sat, 28 Oct 2006 09:05:50 -0700 (PDT)
Message-ID: <20061028160550.13511.qmail@web38906.mail.mud.yahoo.com> (raw)

I do something similiar, but I don't see these delays. Do you have more details 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 tried simply debugging in the script to see where the bottleneck may lay? For example, doing a simply puts with clock at various points in the script.
 
--brett

----- Original Message ----
From: Carlo Stonebanks <stonec.register@sympatico.ca>
To: pgsql-interfaces@postgresql.org
Sent: Tuesday, October 24, 2006 6:10:55 PM
Subject: [INTERFACES] pg_exec commit causes extremely long delays

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 



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend








view thread (3+ messages)  latest in thread

Message-ID: <20061028160550.13511.qmail@web38906.mail.mud.yahoo.com>
Permalink:  ../20061028160550.13511.qmail@web38906.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20061028160550.13511.qmail@web38906.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: brett_schwarz@yahoo.com, stonec.register@sympatico.ca
  Subject: Re: pg_exec commit causes extremely long delays
  In-Reply-To: <20061028160550.13511.qmail@web38906.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox