Re: How to troubleshoot a halted postgres 8.3 ?

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: stefan <stefan(at)intermediate(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to troubleshoot a halted postgres 8.3 ?
Date: 2009-10-20 13:48:55
Message-ID: d3ab2ec80910200648v167d6e26k7552b8d9d6b2bb77@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Oct 20, 2009 at 8:46 AM, stefan <stefan(at)intermediate(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anj Adu 2009-10-20 14:04:27 server process crash
Previous Message stefan 2009-10-20 12:46:43 How to troubleshoot a halted postgres 8.3 ?