BUG #3261: autovacuum starts regarding config setting

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

BUG #3261: autovacuum starts regarding config setting

От:
"Evgeny Gridasov" <eugrid@fpm.kubsu.ru>
Дата:
The following bug has been logged online:

Bug reference:      3261
Logged by:          Evgeny Gridasov
Email address:      eugrid@fpm.kubsu.ru
PostgreSQL version: 8.2.4-CVS
Operating system:   Linux
Description:        autovacuum starts regarding config setting
Details: 

Hello,

autovacuum starts even if autovacuum=off is set in config file, I've checked
it through 'show autovacuum' and see it off. But still there is an
autovacuum process vacuuming the tables.

is this 8.2.4 CVS-only issue?

CVS checkout was yesterday at about 15:00-16:00 GMT

Evgeny.

Re: BUG #3261: autovacuum starts regarding config setting

От:
Heikki Linnakangas <heikki@enterprisedb.com>
Дата:
Evgeny Gridasov wrote:
> autovacuum starts even if autovacuum=off is set in config file, I've checked
> it through 'show autovacuum' and see it off. But still there is an
> autovacuum process vacuuming the tables.

Even when you disable autovacuum with autovacuum=off, it's still 
launched to prevent xid wraparound. See the documentation on xid 
wrap-around:

http://www.postgresql.org/docs/8.2/interactive/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND

and on the autovacuum_freeze_max_age configuration variable for more 
information.

> is this 8.2.4 CVS-only issue?

No. It's a new feature in the 8.2.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Re: BUG #3261: autovacuum starts regarding config setting

От:
Heikki Linnakangas <heikki@enterprisedb.com>
Дата:
Please CC the list to allow others to participate in the discussion, and 
to have it archived for future readers...

Evgeny Gridasov wrote:
> I've seen it analyzing and vacuuming some tables for a long time...
> Is it OK?
> The reason I'm asking I was dump-restoring a huge database, and disabled
> autovacuum in config file.

Well, to avoid XID wrap-around, you have to run (auto)vacuum eventually. 
If you don't mind that your clog files will take up more disk space, as 
you probably don't if you have a huge database anyways, you can increase 
autovacuum_freeze_max_age so you don't need to run it as often.

But I'm starting to wonder if it was the XID wraparound that triggered 
the autovacuum after all. You did restart postmaster after setting 
autovacuum=off in the config file, right? That's required for the 
setting to take effect.

What table is it vacuuming? A recently restored table shouldn't need to 
be vacuumed for a long time.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Re: BUG #3261: autovacuum starts regarding config setting

От:
Evgeny Gridasov <eugrid@fpm.kubsu.ru>
Дата:
Heikki,

Yes, I did restart postmaster after setting autovacuum=off
as I've mentioned before I've checked it using show autovacuum.

It was vacuuming a table from the old database while
the server was running pg_dump -U postgres old_base | psql new_base postgres


Sorry for missing the CC, I had a bad night sleep (actually dump-restored db =)

On Fri, 04 May 2007 11:57:25 +0100
Heikki Linnakangas  wrote:

> Please CC the list to allow others to participate in the discussion, and 
> to have it archived for future readers...
> 
> Evgeny Gridasov wrote:
> > I've seen it analyzing and vacuuming some tables for a long time...
> > Is it OK?
> > The reason I'm asking I was dump-restoring a huge database, and disabled
> > autovacuum in config file.
> 
> Well, to avoid XID wrap-around, you have to run (auto)vacuum eventually. 
> If you don't mind that your clog files will take up more disk space, as 
> you probably don't if you have a huge database anyways, you can increase 
> autovacuum_freeze_max_age so you don't need to run it as often.
> 
> But I'm starting to wonder if it was the XID wraparound that triggered 
> the autovacuum after all. You did restart postmaster after setting 
> autovacuum=off in the config file, right? That's required for the 
> setting to take effect.
> 
> What table is it vacuuming? A recently restored table shouldn't need to 
> be vacuumed for a long time.
> 
> -- 
>    Heikki Linnakangas
>    EnterpriseDB   http://www.enterprisedb.com
>
FAQ