pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Carlo Stonebanks <stonec.register@sympatico.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: commit so slow program looks frozen
Date: Wed, 25 Oct 2006 15:19:10 -0300
Message-ID: <20061025181910.GW26407@alvh.no-ip.org> (raw)
In-Reply-To: <eho0sj$2eht$1@news.hub.org>
References: <eho0sj$2eht$1@news.hub.org>

Carlo Stonebanks wrote:

> 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 
> deal later and seen that it was running again.
> 
> Sometimes I decide it *IS* frozen and have to restart. Because Ctrl-C will 
> not cause the script to break, it appears the app is stuck in non-TCL code 
> (either waiting for postgres or stuck in the interface code?)

You may try to figure out what's the process doing (the backend
obviously, not the frontend (Tcl) process) by attaching to it with
strace.  Is it doing system calls?  Maybe it's busy reading from or
writing to disk.  Maybe it's swamped by a context switch storm (but in
that case, probably the other processes would be affected as well).

Or you may want to attach to it with GDB and see what the backtrace
looks like.  If nothing obvious pops up, do it several times and compare
them.

I wouldn't expect it to be stuck on locks, because if it's only on
commit, then it probably has all the locks it needs.  But try to see if
you can find something not granted in pg_locks that it may be stuck on.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (22+ messages)  latest in thread

Message-ID: <20061025181910.GW26407@alvh.no-ip.org>
Permalink:  ../20061025181910.GW26407@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20061025181910.GW26407@alvh.no-ip.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, stonec.register@sympatico.ca
  Subject: Re: commit so slow program looks frozen
  In-Reply-To: <20061025181910.GW26407@alvh.no-ip.org>
  References: <eho0sj$2eht$1@news.hub.org> <20061025181910.GW26407@alvh.no-ip.org>

* 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