Re: ALTER TABLE ADD COLUMN takes forever

Поиск
Список
Период
Сортировка
От Devendra Yadav
Тема Re: ALTER TABLE ADD COLUMN takes forever
Дата
Msg-id CAE+tJY-FqRdmwSb1Gcd4dCg9BOpfxy5zQCEf3s2KsiFyzNag2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE ADD COLUMN takes forever  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
Laurenz,

You're a saviour. 
Thanks a bunch.

This thread can be closed

Regards,
Devendra Yadav

On Tue, 30 Mar 2021, 16:42 Laurenz Albe, <laurenz.albe@cybertec.at> wrote:
On Mon, 2021-03-29 at 22:48 +0530, Devendra Yadav wrote:
> > I am running a query on a table - ALTER TABLE mytable ADD COLUMN deposited DOUBLE PRECISION DEFAULT 0.0;
> > >
> > > this query just runs forever.
> >
> > Then either you are using a PostgreSQL version older than v11, or there
> > is an open transaction that used the table and blocks you.
>
> We are using PostgreSQL v12.1
> There are no open transactions as the table is not blocked by any pid. However when i check pg_locks it say granted=false
> but nothing blocking it. Bit strange!!

As I replied in the other thread you started, you are probably blocked
by a prepared transaction.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

В списке pgsql-admin по дате отправления:

Предыдущее
От: Devendra Yadav
Дата:
Сообщение: Re: ALTER TABLE blocked
Следующее
От: Tom Lane
Дата:
Сообщение: Re: