Skip site navigation (1) Skip section navigation (2)

Re: Problems with autovacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Łukasz Jagiełło <lukasz(dot)jagiello(at)gforces(dot)pl>, Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Problems with autovacuum
Date: 2009-05-26 23:27:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane escribi:
>> Hmm, maybe we need to improve the code too.  This example suggests that
>> there needs to be some limit on the worker launch rate, even if there
>> are so many databases that that means we don't meet naptime exactly.

> We already have a 100ms lower bound on the sleep time (see
> launcher_determine_sleep()).  Maybe that needs to be increased?

Maybe.  I hesitate to suggest a GUC variable ;-)

One thought is that I don't trust the code implementing the minimum
too much:

	/* 100ms is the smallest time we'll allow the launcher to sleep */
	if (nap->tv_sec <= 0 && nap->tv_usec <= 100000)
		nap->tv_sec = 0;
		nap->tv_usec = 100000;	/* 100 ms */

What would happen if tv_sec is negative and tv_usec is say 500000?
Maybe negative tv_sec is impossible here, but ...

			regards, tom lane

In response to


pgsql-performance by date

Next:From: Alvaro HerreraDate: 2009-05-26 23:51:54
Subject: Re: Problems with autovacuum
Previous:From: Alvaro HerreraDate: 2009-05-26 23:12:42
Subject: Re: Problems with autovacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group