autovacuum not working?

Поиск
Список
Период
Сортировка
Искать

autovacuum not working?

От:
"Medora Schauer" <mschauer@fairfield.com>
Дата:
Вложения:

I’ve recently moved to 8.1 and find that autovacuum doesn’t seem to be working, at least not the way I expected it to.  I need the tuple count for a table to be updated so indexes will be used when appropriate. I was expecting the tuples count for a table to be updated after autovacuum ran.  This doesn’t seem to be the case.  I added 511 records to a previously empty table and waited over an hour.  Tuples for the table (as per pgaccess) was 0.  After I did a manual vacuum analyze it went to 511.

 

Am I missing something?  Should there be something in the log file to indicate that autovacuum has run?

 

I’m attaching my conf file.

 

Medora Schauer

Fairfield Industries

 

 

 

Re: autovacuum not working?

От:
Bill Moran <wmoran@collaborativefusion.com>
Дата:
In response to "Medora Schauer" :

> I've recently moved to 8.1 and find that autovacuum doesn't seem to be
> working, at least not the way I expected it to.  I need the tuple count
> for a table to be updated so indexes will be used when appropriate. I
> was expecting the tuples count for a table to be updated after
> autovacuum ran.  This doesn't seem to be the case.  I added 511 records
> to a previously empty table and waited over an hour.  Tuples for the
> table (as per pgaccess) was 0.  After I did a manual vacuum analyze it
> went to 511. 

From your attached config file:

#autovacuum_vacuum_threshold = 1000	# min # of tuple updates before
					# vacuum

-- 
Bill Moran
Collaborative Fusion Inc.

Re: autovacuum not working?

От:
"Medora Schauer" <mschauer@fairfield.com>
Дата:
> From: Bill Moran [mailto:wmoran@collaborativefusion.com]
> In response to "Medora Schauer" :
> 
> > I've recently moved to 8.1 and find that autovacuum doesn't seem to
be
> > working, at least not the way I expected it to.  I need the tuple
count
> > for a table to be updated so indexes will be used when appropriate.
I
> > was expecting the tuples count for a table to be updated after
> > autovacuum ran.  This doesn't seem to be the case.  I added 511
records
> > to a previously empty table and waited over an hour.  Tuples for the
> > table (as per pgaccess) was 0.  After I did a manual vacuum analyze
it
> > went to 511.
> 
> From your attached config file:
> 
> #autovacuum_vacuum_threshold = 1000	# min # of tuple updates before
> 					# vacuum
>

Yup, that was it.

Thanks.

Medora

Re: autovacuum not working?

От:
"Jim C. Nasby" <jim@nasby.net>
Дата:
On Mon, Oct 09, 2006 at 09:27:30AM -0500, Medora Schauer wrote:
> > From your attached config file:
> > 
> > #autovacuum_vacuum_threshold = 1000	# min # of tuple updates before
> > 					# vacuum
> >
> 
> Yup, that was it.

Actually, not quite.

Vacuum will update relpages and reltuples, but it won't update other
stats. That's what analyze does (autovacuum_analyze_threshold). By
default, that's set to 500; I'll typically drop it to 200 or so (keep in
mind that analyze is much cheaper than vacuum).
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)
FAQ