Get the latest tech news

Estimating the disk space needed for a VACUUM FULL on PostgreSQL


Established in 2020, this site serves as a memory bank of notes and guides for me to reference again down the line, made public with the knowledge that others are likely to encounter simillar situations, especially in niche environments.

If you find yourself in the position where you need a full vacuum, you’re probably already looking at the number of dead tuples to have reached that conclusion. We have a table, occupying 50 MB on disk and containing one million rows, of which half are pending a cleanup. Our new table occupies exactly half of the original, so the combined size at the moment the deletion happened would have been 25MB + 50MB = 75MB.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of PostgreSQL

PostgreSQL

Photo of disk space

disk space

Related news:

News photo

RAG with PostgreSQL

News photo

Hacking on PostgreSQL Is Hard

News photo

Crunchy Bridge for Analytics: Your Data Lake in PostgreSQL