Skip site navigation (1) Skip section navigation (2)

Re: index bloat in 8.4-dev

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: index bloat in 8.4-dev
Date: 2008-10-06 20:36:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Mon, 2008-10-06 at 11:10 +0300, Heikki Linnakangas wrote:
> Jeff Davis wrote:
> > I am seeing index bloat in the current head when the indexed values are
> > constantly increasing, and the lower values are being constantly
> > deleted.
> > 
> > ...
> > It's possible that this has something to do with the new FSM.
> Yep, it clearly has. Looks like I forgot about the index FSMs when I 
> added the FSM vacuum code. Index FSMs need to be vacuumed just like the 
> heap FSM. Fixed, thanks for the report.

There is some other bug still at work here. I am still seeing some
pretty severe bloat with the same script I attached in the previous
email. This is the current head (including your patch).

Note that these results are after running my script for about an hour
(although you can probably see the effects after 10 minutes), and my
script has a VACUUM after every DELETE.

I see this problem on 8.3.3 now, too. Originally, I suppose my test was
not long enough, but now I see the problem after about 10 minutes of

		Jeff Davis

-- results from current head
=> select relpages from pg_class where relname = 'foo_i_key';
(1 row)

=> select relpages from pg_class where relname = 'foo_i_key';
(1 row)

=> select count(*) from;
(1 row)

=> vacuum verbose;
INFO:  vacuuming ""
INFO:  index "foo_i_key" now contains 101163 row versions in 35255 pages
DETAIL:  0 index row versions were removed.
35029 index pages have been deleted, 35029 are currently reusable.
CPU 0.11s/0.07u sec elapsed 0.20 sec.
INFO:  "foo": found 0 removable, 101163 nonremovable row versions in 785
DETAIL:  0 dead row versions cannot be removed yet.
There were 98837 unused item pointers.
0 pages are entirely empty.
CPU 0.11s/0.08u sec elapsed 0.21 sec.

=> select min(i), max(i) from;
    min    |    max    
 205100001 | 205200000
(1 row)

In response to


pgsql-bugs by date

Next:From: Heikki LinnakangasDate: 2008-10-07 08:04:47
Subject: Re: index bloat in 8.4-dev
Previous:From: Heikki LinnakangasDate: 2008-10-06 16:01:46
Subject: Re: BUG #4451: initcap() function capitalizes incorrectly

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group