Re: commit so slow program looks frozen

От: Alvaro Herrera
Тема: Re: commit so slow program looks frozen
Дата: ,
Msg-id: 20061025181910.GW26407@alvh.no-ip.org
(см: обсуждение, исходный текст)
Ответ на: commit so slow program looks frozen  ("Carlo Stonebanks")
Список: pgsql-performance

Скрыть дерево обсуждения

commit so slow program looks frozen  ("Carlo Stonebanks", )
 Re: commit so slow program looks frozen  (Alvaro Herrera, )
 Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
  Re: commit so slow program looks frozen  (Brian Hurt, )
  Re: commit so slow program looks frozen  (Scott Marlowe, )
   Re: commit so slow program looks frozen  ("Joshua D. Drake", )
   Re: commit so slow program looks frozen  ("Magnus Hagander", )
   Re: commit so slow program looks frozen  (Richard Troy, )
   Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
    Re: commit so slow program looks frozen  ("Bucky Jordan", )
 Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
  Re: commit so slow program looks frozen  ("Jim C. Nasby", )
 Re: commit so slow program looks frozen  ("Rocco Altier", )
  Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
   Re: commit so slow program looks frozen  ("Merlin Moncure", )
    Re: commit so slow program looks frozen  ("Simon Riggs", )
     Re: commit so slow program looks frozen  ("Merlin Moncure", )
      Re: commit so slow program looks frozen  (Rob Lemley, )
   Re: commit so slow program looks frozen  (Richard Troy, )
    OT: TCL vs Perl Re: commit so slow program looks frozen  (, )
     Re: OT: TCL vs Perl Re: commit so slow program looks frozen  ("Joshua D. Drake", )
  Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
  Re: commit so slow program looks frozen  ("Carlo Stonebanks", )
 Re: commit so slow program looks frozen  ("Carlo Stonebanks", )

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


В списке pgsql-performance по дате сообщения:

От: "Joshua D. Drake"
Дата:
Сообщение: Re: commit so slow program looks frozen
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Best COPY Performance