Search Postgresql Archives

Re: Dropping column from big table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, July 15, 2024, sud <suds1434@xxxxxxxxx> 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.

https://github.com/postgres/postgres/blob/d2b74882cab84b9f4fdce0f2f32e892ba9164f5c/src/backend/access/heap/heapam_handler.c#L2499

David J. 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux