pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Handling pg_toast tables
4+ messages / 4 participants
[nested] [flat]

* Handling pg_toast tables
@ 2021-02-25 11:40 satish v <vuyyuru.satish59@gmail.com>
  2021-02-25 15:08 ` Re: Handling pg_toast tables Laurenz Albe <laurenz.albe@cybertec.at>
  2021-02-25 15:30 ` Re: Handling pg_toast tables Keith Fiske <keith.fiske@crunchydata.com>
  2021-02-25 18:35 ` Re: Handling pg_toast tables Ron <ronljohnsonjr@gmail.com>
  0 siblings, 3 replies; 4+ messages in thread

From: satish v @ 2021-02-25 11:40 UTC (permalink / raw)
  To: pgsql-admin

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.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Handling pg_toast tables
  2021-02-25 11:40 Handling pg_toast tables satish v <vuyyuru.satish59@gmail.com>
@ 2021-02-25 15:08 ` Laurenz Albe <laurenz.albe@cybertec.at>
  2 siblings, 0 replies; 4+ messages in thread

From: Laurenz Albe @ 2021-02-25 15:08 UTC (permalink / raw)
  To: satish v <vuyyuru.satish59@gmail.com>; pgsql-admin

On Thu, 2021-02-25 at 17:10 +0530, satish v wrote:
> 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.

Delete soe rows from the table?  I guess there are some large attributes.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Handling pg_toast tables
  2021-02-25 11:40 Handling pg_toast tables satish v <vuyyuru.satish59@gmail.com>
@ 2021-02-25 15:30 ` Keith Fiske <keith.fiske@crunchydata.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Keith Fiske @ 2021-02-25 15:30 UTC (permalink / raw)
  To: satish v <vuyyuru.satish59@gmail.com>; +Cc: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Handling pg_toast tables
  2021-02-25 11:40 Handling pg_toast tables satish v <vuyyuru.satish59@gmail.com>
@ 2021-02-25 18:35 ` Ron <ronljohnsonjr@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Ron @ 2021-02-25 18:35 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On 2/25/21 5:40 AM, satish v 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.

If your database has many LARGE columns (bytea, xml, json or even long text 
values) then... that's how big the tables really are.

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2021-02-25 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 11:40 Handling pg_toast tables satish v <vuyyuru.satish59@gmail.com>
2021-02-25 15:08 ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-02-25 15:30 ` Keith Fiske <keith.fiske@crunchydata.com>
2021-02-25 18:35 ` Ron <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox