How did VACUUM ANALYZE reclaim large TOAST bloat at disk level in PostgreSQL 16?

From: pramod gupta <mail2sony2010(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How did VACUUM ANALYZE reclaim large TOAST bloat at disk level in PostgreSQL 16?
Date: 2025-12-29 15:53:26
Message-ID: CAMxxg=a0PCvrSenxkTSjTsBygh5KJ-bqOo2ZqJvGcsjdiECOWg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Everyone,

We have a table with a total size of ~628 GB, out of which ~601 GB was
TOAST data.
After running VACUUM ANALYZE on a weekly basis, the table size reduced
significantly to ~109 GB, indicating a large amount of bloat removal.

I would like to understand:

How was VACUUM ANALYZE able to reclaim such a large amount of space,
especially for TOAST data?

Under what conditions does PostgreSQL reclaim disk space without requiring
VACUUM FULL or CLUSTER?

Is this behavior expected in PostgreSQL 16, particularly for heavily
updated or deleted TOASTed columns?

Any insights or documentation references would be greatly appreciated.

PostgreSQL version: 16

Thanks in advance.
Pramod Gupta

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2025-12-29 16:06:00 Re: How did VACUUM ANALYZE reclaim large TOAST bloat at disk level in PostgreSQL 16?
Previous Message hubert depesz lubaczewski 2025-12-29 10:11:58 Re: psql: print values and return the COUNT(*) value to bash?