Re: ALTER TABLE ADD COLUMN takes forever - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: ALTER TABLE ADD COLUMN takes forever
Date
Msg-id b987bc47cd88cfe24cc01cddaecdb4bca57a0bfb.camel@cybertec.at
Whole thread Raw
In response to ALTER TABLE ADD COLUMN takes forever  (Devendra Yadav <devendra.857@gmail.com>)
Responses Re: ALTER TABLE ADD COLUMN takes forever
List 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




pgsql-admin by date:

Previous
From: Alex Balashov
Date:
Subject: Re: ALTER TABLE ADD COLUMN takes forever
Next
From: Devendra Yadav
Date:
Subject: Re: ALTER TABLE ADD COLUMN takes forever