On Thu, Feb 25, 2021 at 6:43 AM satish v <vuyyuru.satish59@xxxxxxxxx> wrote:
Hi,My table size is 15 MB but toast table size 92GB,i performed Vacuum and vacuum full,but pg_toast table doesn't shrink.how can we shrink the pg_toast table.Thanks,Satish.
Running a VACUUM FULL on the base table will clean up any bloat on the toast table. Are you sure there's bloat there? Otherwise that's just the size of the data in the table.
Can use this tool to check - https://github.com/keithf4/pg_bloat_check
It takes into account toast tables, which pgstattuple on its own does not do by default.
-- It takes into account toast tables, which pgstattuple on its own does not do by default.