Re: Dropping column from big table - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Dropping column from big table
Date
Msg-id acc8b587497a65d38fafe4e0030e252eda78398f.camel@cybertec.at
Whole thread Raw
In response to Re: Dropping column from big table  (sud <suds1434@gmail.com>)
Responses Re: Dropping column from big table
List pgsql-general
On Thu, 2024-07-11 at 13:10 +0530, sud wrote:
> Dropping will take it's own time for post vacuum however as you
> rightly said, it won't be blocking which should be fine. 

I am not certain if you understood this correctly.

Dropping a column is fast, but doesn't reclaim the space.
VACUUM won't block anything, but won't reclaim the space.
VACUUM (FULL) will block everything, but will also not reclaim the space.

You'd need to use a form of ALTER TABLE that rewrites the table,
as indicated in the documentation.  However, such an operation
will block all access to the table for a long time, and it will
temporarily need much more space, because it has to hold both the
old and the new copy of the table.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: sud
Date:
Subject: Re: Dropping column from big table
Next
From: Ron Johnson
Date:
Subject: Re: Dropping column from big table