Re: Index bloat problem?

От: Mischa Sandberg
Тема: Re: Index bloat problem?
Дата: ,
Msg-id: 1114121722.426825fa4474f@webmail.telus.net
(см: обсуждение, исходный текст)
Ответ на: Re: Index bloat problem?  (Bill Chandler)
Список: pgsql-performance

Скрыть дерево обсуждения

Index bloat problem?  (Bill Chandler, )
 Re: Index bloat problem?  (Josh Berkus, )
  Re: Index bloat problem?  (Alex Turner, )
   Re: Index bloat problem?  (Josh Berkus, )
 Re: Index bloat problem?  (Bill Chandler, )
  Re: Index bloat problem?  (Josh Berkus, )
  Re: Index bloat problem?  (Josh Berkus, )
   Re: Index bloat problem?  (Michael Guerin, )
    Re: Index bloat problem?  (Josh Berkus, )
     Re: Index bloat problem?  (Dave Chapeskie, )
      Re: Index bloat problem?  (Josh Berkus, )
      Re: Index bloat problem?  ("Jim C. Nasby", )
  Re: Index bloat problem?  (Alex Turner, )
 Re: Index bloat problem?  (Chris Browne, )
 Re: Index bloat problem?  (Bill Chandler, )
  Re: Index bloat problem?  (Mischa Sandberg, )
 Re: Index bloat problem?  (Bill Chandler, )
  Re: Index bloat problem?  (Josh Berkus, )
  Re: Index bloat problem?  (John A Meinel, )
 Re: Index bloat problem?  (Tom Lane, )
  Re: Index bloat problem?  (David Roussel, )
   Re: Index bloat problem?  (Tom Lane, )
    Re: Index bloat problem?  ("David Roussel", )
     Re: Index bloat problem?  (Tom Lane, )
 Re: Index bloat problem?  (, )

Quoting Bill Chandler <>:

> ... The normal activity is to delete 3-5% of the rows per day,
> followed by a VACUUM ANALYZE.
...
> However, on occasion, deleting 75% of rows is a
> legitimate action for the client to take.

> > In case nobody else has asked: is your max_fsm_pages
> > big enough to handle all the deleted pages,
> > across ALL tables hit by the purge?

> This parameter is most likely set incorrectly.  So
> that could be causing problems.  Could that be a
> culprit for the index bloat, though?

Look at the last few lines of vacuum verbose output.
It will say something like:

free space map: 55 relations, 88416 pages stored; 89184 total pages needed
  Allocated FSM size: 1000 relations + 1000000 pages = 5920 kB shared memory.

"1000000" here is [max_fsm_pages] from my postgresql.conf.
If the "total pages needed" is bigger than the pages
fsm is allocated for, then you are bleeding.
--
"Dreams come true, not free." -- S.Sondheim, ITW



В списке pgsql-performance по дате сообщения:

От: Gavin Sherry
Дата:
Сообщение: Re: two queries and dual cpu (perplexed)
От: Tom Lane
Дата:
Сообщение: Re: Index bloat problem?