Re: Handling pg_toast tables

From: Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com>
To: satish v <vuyyuru(dot)satish59(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Handling pg_toast tables
Date: 2021-02-25 15:30:48
Message-ID: CAODZiv53cFan9649P3Da4U=J6YadMN_xAd1KNxkx10FYmtzP_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 25, 2021 at 6:43 AM satish v <vuyyuru(dot)satish59(at)gmail(dot)com> 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.

--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2021-02-25 18:35:04 Re: Handling pg_toast tables
Previous Message Laurenz Albe 2021-02-25 15:08:51 Re: Handling pg_toast tables