Discussion about this post

User's avatar
Chetan Natesh's avatar

Damn! So often we treat deletion as something instant, when in practice it behaves more like deferred work that keeps piling up in the background. How do you handle situations where data actually needs to be gone within a strict time window, like for privacy laws, but the system naturally wants to delay deletion to stay stable?

Saravana Thiyagarajan's avatar

I think b-tree also don’t delete the row immediately. They just mark it as tombstone. In vacuum process it’s cleaned and the space is reclaimed.

It because database use pages to store the data where doing delete immediately need moving the bytes on the pages. There different variants of the b-tree use different approach.

Nice read.

2 more comments...

No posts

Ready for more?