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-21 12:48:32
Message-ID: d3ab2ec80910210548x60307727n516bb9a3a823d0c2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Oct 21, 2009 at 3:05 AM, stefan <stefan(at)intermediate(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2009-10-21 13:45:00 Re: can I get a bit more attribute out of \dt directive?
Previous Message Harald Fuchs 2009-10-21 11:29:08 Re: can I get a bit more attribute out of \dt directive?