Обсуждение: pg_autovacuum not sleeping

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

pg_autovacuum not sleeping

От
"Brandon Metcalf"
Дата:
We're using pg_autovacuum with PostgreSQL 8.0.3 and it isn't sleeping
as long as the claims it will.  For example,

  ...
  [2005-09-20 15:40:23 CDT] INFO:         last_analyze_count: 21735550; last_vacuum_count: 21735009
  [2005-09-20 15:40:23 CDT] INFO:         analyze_threshold: 40676; vacuum_threshold: 81352
  [2005-09-20 15:40:23 CDT] DEBUG:   347 All DBs checked in: 1428748500 usec, will sleep for 4886 secs.
  [2005-09-20 15:50:14 CDT] DEBUG:   Performing: VACUUM ANALYZE "public"."model_lastexport"

So, pg_autovacuum says it's going to sleep for 4886 seconds, but fires
up again after just under 600 seconds.

Can anyone explain what I'm seeing?

Thanks.

--
Brandon

Re: pg_autovacuum not sleeping

От
Bruce Momjian
Дата:
Brandon Metcalf wrote:
> We're using pg_autovacuum with PostgreSQL 8.0.3 and it isn't sleeping
> as long as the claims it will.  For example,
>
>   ...
>   [2005-09-20 15:40:23 CDT] INFO:         last_analyze_count: 21735550; last_vacuum_count: 21735009
>   [2005-09-20 15:40:23 CDT] INFO:         analyze_threshold: 40676; vacuum_threshold: 81352
>   [2005-09-20 15:40:23 CDT] DEBUG:   347 All DBs checked in: 1428748500 usec, will sleep for 4886 secs.
>   [2005-09-20 15:50:14 CDT] DEBUG:   Performing: VACUUM ANALYZE "public"."model_lastexport"
>
> So, pg_autovacuum says it's going to sleep for 4886 seconds, but fires
> up again after just under 600 seconds.
>
> Can anyone explain what I'm seeing?

Yep, this was fixed in 8.0.X CVS in May, two days after the release of
8.0.3:

    revision 1.27.4.4
    date: 2005/05/11 17:58:32;  author: momjian;  state: Exp;  lines: +11 -2
    Fix pg_autovacuum -s flag to handle values > 2000 by using sleep()
    instead of pg_usleep.

    Backpatch to 8.0.X.

We are thinking of putting out an 8.0.4 in a few days, but until then
you can pull from CVS branch REL8_0_STABLE and use that fix in
pg_autovacuum.c.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: pg_autovacuum not sleeping

От
"Brandon Metcalf"
Дата:
p == pgman@candle.pha.pa.us writes:

 p> Brandon Metcalf wrote:

 ...

 p> > So, pg_autovacuum says it's going to sleep for 4886 seconds, but fires
 p> > up again after just under 600 seconds.
 p> >
 p> > Can anyone explain what I'm seeing?

 p> Yep, this was fixed in 8.0.X CVS in May, two days after the release of
 p> 8.0.3:

 p>     revision 1.27.4.4
 p>     date: 2005/05/11 17:58:32;  author: momjian;  state: Exp;  lines: +11 -2
 p>     Fix pg_autovacuum -s flag to handle values > 2000 by using sleep()
 p>     instead of pg_usleep.

 p>     Backpatch to 8.0.X.

 p> We are thinking of putting out an 8.0.4 in a few days, but until then
 p> you can pull from CVS branch REL8_0_STABLE and use that fix in
 p> pg_autovacuum.c.


Thanks.  That did the trick.


--
Brandon