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

From David G. Johnston
Subject Re: Dropping column from big table
Date
Msg-id CAKFQuwZL8jWOX35fSRsMp2tjfGpqsnUgG=cCKuVBen5PC8Jddg@mail.gmail.com
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 Monday, July 15, 2024, sud <suds1434@gmail.com> wrote:

However even with "vacuum full", the old rows will be removed completely from the storage , but the new rows will always be there with the 'dropped' column still existing under the hood along with the table storage,  with just carrying "null" values in it. […] Is this understanding correct?

No.  The table rewrite process involves creating new tuples that exactly conform to the current row specification.  The potentially non-null data present in live tuples for columns that have been dropped are not copied into the newly constructed tuples.


David J. 

pgsql-general by date:

Previous
From: sud
Date:
Subject: Re: Dropping column from big table
Next
From: "David G. Johnston"
Date:
Subject: Re: Dropping column from big table