surprised to find bloat in insert-only table

From: Mark Stosberg <mark(at)summersault(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: surprised to find bloat in insert-only table
Date: 2011-06-03 15:10:51
Message-ID: isathr$kig$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


I recently set up partitioning on a table that sees heavy insert
traffic. There are never updates or deletes, we just drop the partitions
later.

It's my understanding that bloat can only appear through updates or
deletes, but these partitions are reported to have significant bloat in
them. Where else can this come from and how I can I reduce it?

I'm using a "bloat" view with 9.0.3 which might the same as this one:

https://wiki.postgresql.org/wiki/Show_database_bloat

This shows that each index on the table has over a gig of bloat:

select distinct(iname), wastedbytes, wastedsize from bloat where
wastedbytes > 0 order by wastedbytes DESC limit 20;

And this query also shows the same amount of bloat in the table itself:

select distinct(tablename), wastedbytes, wastedsize from bloat where
wastedbytes > 0 order by wastedbytes DESC limit 10;

Mark

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-06-03 16:02:02 Re: surprised to find bloat in insert-only table
Previous Message Mike Broers 2011-06-03 14:46:53 any tricks to get foreign key constraint builds faster