Re: ALTER TABLE ADD COLUMN takes forever

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Devendra Yadav <devendra(dot)857(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: ALTER TABLE ADD COLUMN takes forever
Date: 2021-03-29 17:14:42
Message-ID: b987bc47cd88cfe24cc01cddaecdb4bca57a0bfb.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 2021-03-29 at 22:38 +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.

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Devendra Yadav 2021-03-29 17:15:43 Re: ALTER TABLE ADD COLUMN takes forever
Previous Message Alex Balashov 2021-03-29 17:11:48 Re: ALTER TABLE ADD COLUMN takes forever