VACUUM એ PostgreSQL ની જાળવણી પ્રક્રિયા છે જે dead tuples (MVCC દ્વારા બાકી રહેલ અપ્રચલિત પંક્તિ સંસ્કરણો) માંથી સ્ટોરેજ ફરીથી મેળવે છે અને આંકડાઓ અપડેટ કરે છે. કારણ કે Postgres નું MVCC દરેક UPDATE/DELETE પર dead rows બનાવે છે, VACUUM ને bloat અટકાવવા અને ડેટાબેસને સ્વસ્થ રાખવા માટે આવશ્યક છે. Autovacuum તેને સ્વચાલિત કરે છે.
Dead tuples શેના માટે અસ્તિત્વમાં છે (MVCC જોડાણ)
MVCC: an UPDATE/DELETE doesn't overwrite a row — it marks the old version obsolete
(a "dead tuple") and may create a new one. Dead tuples accumulate over time.
→ Without cleanup, dead tuples cause BLOAT: wasted disk space, slower scans
(more data to read), degraded performance.
VACUUM reclaims this dead space → keeps tables compact and queries fast.
