Re: autovacuum does not start in HEAD - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: autovacuum does not start in HEAD
Date
Msg-id 20070507192605.GP3939@alvh.no-ip.org
Whole thread Raw
In response to Re: autovacuum does not start in HEAD  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
ITAGAKI Takahiro wrote:
> Alvaro Herrera <alvherre@commandprompt.com> wrote:
> 
> > ITAGAKI Takahiro wrote:
> > > > I found that autovacuum launcher does not launch any workers in HEAD.
> > > 
> > > The attached autovacuum-fix.patch could fix the problem. I changed
> > > to use 'greater or equal' instead of 'greater' at the decision of
> > > next autovacuum target.
> > 
> > I have committed a patch which might fix this issue in autovacuum.c rev 1.44.
> > Please retest.
> 
> HEAD (r1.45) is still broken. We skip entries using the test
>   adl_next_worker - autovacuum_naptime < current_time <= adl_next_worker,
> but the second inequation should be
>   adl_next_worker - autovacuum_naptime < current_time < adl_next_worker,
> because adl_next_worker can equal current_time.

Ok, I'll change this.

> By the way, why do we need the upper bounds to decide a next target?
> Can we use simplify it to "current_time < adl_next_worker"?

No, we can't take that check out, because otherwise a database could be
skipped forever if it happens to fall behind for some reason (for
example when a new database is created and autovac decides to work on
that one instead of the one that was scheduled).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: [COMMITTERS] psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory
Next
From: Hiroshi Inoue
Date:
Subject: Re: [COMMITTERS] psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory