ITAGAKI Takahiro wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> 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                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to