Re: 8.0.3 pg_autovacuum doesn't clear out stats table?

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: 8.0.3 pg_autovacuum doesn't clear out stats table?
Дата
Msg-id 20060223234945.GN2068@pervasive.com
обсуждение исходный текст
Ответ на Re: 8.0.3 pg_autovacuum doesn't clear out stats table?  (Robin Iddon <robin@edesix.com>)
Список pgsql-admin
On Thu, Feb 23, 2006 at 11:44:47PM +0000, Robin Iddon wrote:
>
> >
> >In fact I just noticed that the number of stats tuples just climbed
> >from 1236 to 2634.  The ins/del counts are still zero.  I ran analyze
> >and the update counter went up only by 1232.  For pg_autovacuum to
> >vacuum this table I need (2*2634)+1000 = 6268 updates, which is never
> >going to happen.
>
> At least not before the number of tuples has climbed to beyond that
> count based on my experience to date!

I think you're confusing tuples and rows. Everytime you update a row,
you create a new tuple. As you've seen, every time you run analyze,
~1400 rows are being updated, which means 1400 new tuples. So as long as
pg_autovacuum stays running long enough, it will notice that
pg_statistics needs to be vacuumed. Note that it's critical that
pg_autovac stay running; it keeps the counts of how many tuples every
table has in memory, so if it gets shutdown before enough updates
accumulate, the count re-starts from scratch. I'm not certain if the
builtin vacuum in 8.1 solves that problem or not.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

В списке pgsql-admin по дате отправления:

Предыдущее
От: Robin Iddon
Дата:
Сообщение: Re: 8.0.3 pg_autovacuum doesn't clear out stats table?
Следующее
От: Robin Iddon
Дата:
Сообщение: Re: 8.0.3 pg_autovacuum doesn't clear out stats table?