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 d3ab2ec80910210548x60307727n516bb9a3a823d0c2@mail.gmail.com
Whole thread Raw
In response to Re: How to troubleshoot a halted postgres 8.3 ?  ("stefan" <stefan@intermediate.de>)
List pgsql-admin

On Wed, Oct 21, 2009 at 3:05 AM, stefan <stefan@intermediate.de> wrote:



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 ?

   Right, but that's only for statements that don't take a full table lock.   Since your 'ALTER' statement was locking the whole table, those rules don't apply -- i.e. Everyone even looking (selecting) the table would wait, even if they didn't care about the new columns.  ALTER is a full lock,  no matter what.


--Scott

pgsql-admin by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: can I get a bit more attribute out of \dt directive?
Next
From: Tom Lane
Date:
Subject: Re: can I get a bit more attribute out of \dt directive?