Re: Problem running "ALTER TABLE...", ALTER TABLE waiting

From: Brian McNally <bmcnally(at)uw(dot)edu>
To: Sergey Konoplev <sergey(dot)konoplev(at)postgresql-consulting(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, raghu ram <raghuchennuru(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem running "ALTER TABLE...", ALTER TABLE waiting
Date: 2012-08-10 18:32:25
Message-ID: 502553B9.1080900@uw.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In an interesting twist, we tried to drop the table in question and got
this:

-bash-3.2$ dropdb exomeSNP
dropdb: database removal failed: ERROR: database "exomeSNP" is being
accessed by other users
DETAIL: There are 1 prepared transaction(s) using the database.
-bash-3.2$

So, it seems that maybe there is prepared transaction that could be
holding up the ALTER TABLE. I'm a bit confused though since previous
attempts to find that didn't succeed. Maybe I just haven't used to
correct query yet.

--
Brian McNally

On 08/09/2012 12:30 AM, Sergey Konoplev wrote:
> On Thu, Aug 9, 2012 at 4:58 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Brian McNally <bmcnally(at)uw(dot)edu> writes:
>>> Ok, I'm running with all available updates and kernel 2.6.18-308.4.1.el5
>>> but am still having the same problem.
>>
>> It's fairly clearly blocked on a lock ... have you looked into the
>> pg_locks view to see what is holding the lock?
>
> There is a hidden part of the conversation. We have already checked
> pg_locks and no locks were there. Moreover there were no other
> activity except the ALTER. And this was the odd part.
>
>> (I'm wondering about a prepared transaction, myself. There isn't much
>> else that could hold a lock across a server restart.)
>
> Are not they shown by pg_locks?
>
>>
>> regards, tom lane
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2012-08-10 19:03:14 Re: is 9.x so much better than 8.x?
Previous Message Geert Mak 2012-08-10 15:32:34 is 9.x so much better than 8.x?