public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: sud <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Peter J. Holzer <[email protected]>
Subject: Re: Dropping column from big table
Date: Mon, 15 Jul 2024 21:52:41 -0700
Message-ID: <CAKFQuwZL8jWOX35fSRsMp2tjfGpqsnUgG=cCKuVBen5PC8Jddg@mail.gmail.com> (raw)
In-Reply-To: <CAD=mzVVTE1Jx0fpsQ=OVW0CL5LiGg_RHA4kq+cbPqTShA5EwVw@mail.gmail.com>
References: <CAD=mzVUGj2Zg0RY9YJwgDzAeghPjuT0FOnNs-aysTBGss87Yyw@mail.gmail.com>
<[email protected]>
<CAD=mzVUS8mFK42zmVUUC3JkiN=9QSUZ_Qxayd6=KJwbqdd0HzA@mail.gmail.com>
<CANzqJaBAOzCjXaBFLa6cYweVNf5LbBvLYFkWx_hb3YezOP3quw@mail.gmail.com>
<CAD=mzVXK+4tLMbENMecruPbk8cmeE4smD=ENUrwx5wh4N7hZhA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAD=mzVW9d0cPfccGVHLvCkcq4Mc-Wg5La3+XAHHEY1AMeOQ_Bw@mail.gmail.com>
<[email protected]>
<CAD=mzVVTE1Jx0fpsQ=OVW0CL5LiGg_RHA4kq+cbPqTShA5EwVw@mail.gmail.com>
On Monday, July 15, 2024, sud <[email protected]> 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/acces...
David J.
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Dropping column from big table
In-Reply-To: <CAKFQuwZL8jWOX35fSRsMp2tjfGpqsnUgG=cCKuVBen5PC8Jddg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox