Re: How to troubleshoot a halted postgres 8.3 ?

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

Hi Scott,

> 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.

> Look at the pg_stat_activity and pg_locks views.

Thanks, you were right, I added an additional commit which solved the problem. The hint was that the pg_lock view contained a lock entry which said granted "No".

This raises though the question of isolation level, afaik postgres default is committed read. The doc says that another query would see the data as it was before the start of the transaction, which in my case would have been fine since the additional columns created by the alter statement were not used in the select which blocked.
Is this some kind of "simple" implementation of a committed read ?

Thanks,

Stefan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Hans Guijt 2009-10-21 10:32:40 Range-based clustering?
Previous Message Jaime Casanova 2009-10-21 04:39:04 Re: WAL file compatibility