Re: autovacuum does not start in HEAD

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: autovacuum does not start in HEAD
Date: 2007-05-07 19:26:05
Message-ID: 20070507192605.GP3939@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

ITAGAKI Takahiro wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2007-05-07 19:27:20 Re: psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory
Previous Message Hiroshi Inoue 2007-05-07 19:17:19 Re: psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-05-07 21:31:55 Re: Diagnostic functions
Previous Message Tomas Doran 2007-05-07 18:48:25 Implemented current_query