Tell me you don’t know how DBs work without telling me you don’t know how DBs work.

The dropped columns are deleted once a row containing the value is updated, or for the entire table once a full vacuum is ran.

After that the only thing that remains is the column having existed. Rewriting the entire table immediately on drop column would be disruptive (just do a vacuum if you care!), and removing the record of the column existing would require a similar operation that has negligible benefits

nostr:note18gvcptru52dfgej79khgrpwfxhjdys54qarv2y2kn54s27wkh0dq9r8etp

Reply to this note

Please Login to reply.

Discussion

That blog post just proves my point. Vacuum full does remove the data.

All that remains is a tombstone of the column.

You are missing my point. Read again:

"However, if you look at the pg_attribute table, you'll see that the column is still there and marked as dropped."

Okay so what? The data is gone. The name is gone. The data type is gone. Everything about the column except that there was SOME column is gone.

And you’re telling me this is not true deletion?

Correct. That's the point. Postgres doesn't delete columns. Even after full vacuum (which is not something people do all the time), the damn column is still there.

The column is there with absolutely no data and only remaining there as a tombstone. To remove it would require significant effort that has minimal benefit

It doesn't matter. The column is still there. That's what I said.

The column is there with what? Absolutely nothing! That column is about as good as gone even if you forensically analyse the files.

Like I said. It doesn't matter. The point of the post is that the column is still there, soft deleted.

Also, it's funny that you thought I didn't know any of this.

Well, what remains about the column:

- a tombstone

What does not remain about it:

- all of its data

- the name and data type

- any indexes on it

Also, your original post very clearly 8: referring to data not being deleted, with the last remark on your post, and claiming the data is soft deleted.

Don’t look at CoW filesystems or filesystems in general, or flash translation layers, please