Re: How to troubleshoot a halted postgres 8.3 ? - Mailing list pgsql-admin

From Scott Mead
Subject Re: How to troubleshoot a halted postgres 8.3 ?
Date
Msg-id d3ab2ec80910200648v167d6e26k7552b8d9d6b2bb77@mail.gmail.com
Whole thread Raw
In response to How to troubleshoot a halted postgres 8.3 ?  ("stefan" <stefan@intermediate.de>)
List pgsql-admin
On Tue, Oct 20, 2009 at 8:46 AM, stefan <stefan@intermediate.de> wrote:

Hi,

I have a postgres 8.3 db in which I execute a transaction with a lot of alter tabel etc, update etc statements in a single transaction.
I also execute several select statements in parallel.
This puts my database in a state which I would describe as halted, i.e. the sql interface does not respond any more, pg_admin works and shows me several transactions running.

  Remember, alter table statements require a full table lock.  So if that transaction (including your update statements) doesn't end somehow (commit, rollback) then all other connections looking at that table will wait.


 
How do I proceed to analyze what's happened? Of course, my first thought is some kind of transaction deadlock, but how do I check for this ?

   Look at the pg_stat_activity and pg_locks views.


--Scott

pgsql-admin by date:

Previous
From: "stefan"
Date:
Subject: How to troubleshoot a halted postgres 8.3 ?
Next
From: Anj Adu
Date:
Subject: server process crash