Unix Technical Forum

Turning off Autovacuum

This is a discussion on Turning off Autovacuum within the Pgsql Performance forums, part of the PostgreSQL category; --> Not quite a performance question, but I can't seem to find a simple answer to this. We're using 8.1.4 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 10:20 AM
Steven Flatt
 
Posts: n/a
Default Turning off Autovacuum

Not quite a performance question, but I can't seem to find a simple answer
to this. We're using 8.1.4 and the autovacuum daemon is running every 40
seconds cycling between 3 databases. What is the easiest way to disable the
autovacuumer for a minute or two, do some other work, then re-enable it? Do
I have to modify postgresql.conf and send a HUP signal to pick up the
changes?

I figured this would work but I can't find a reason why not:

# show autovacuum;
autovacuum
------------
on
(1 row)

# set autovacuum to off;
ERROR: parameter "autovacuum" cannot be changed now

In postgresql.conf:

autovacuum = on

Thanks,

Steve

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:20 AM
Tomas Vondra
 
Posts: n/a
Default Re: Turning off Autovacuum

If you want to disable it only for some tables, you can put special
values into pg_autovacuum. This won't disable the autovacuum daemon, but
some of the tables won't be vacuumed.

Tomas
> Not quite a performance question, but I can't seem to find a simple
> answer to this. We're using 8.1.4 and the autovacuum daemon is
> running every 40 seconds cycling between 3 databases. What is the
> easiest way to disable the autovacuumer for a minute or two, do some
> other work, then re-enable it? Do I have to modify postgresql.conf
> and send a HUP signal to pick up the changes?
>
> I figured this would work but I can't find a reason why not:
>
> # show autovacuum;
> autovacuum
> ------------
> on
> (1 row)
>
> # set autovacuum to off;
> ERROR: parameter "autovacuum" cannot be changed now
>
> In postgresql.conf:
>
> autovacuum = on
>
> Thanks,
>
> Steve
>



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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:20 AM
Steven Flatt
 
Posts: n/a
Default Re: Turning off Autovacuum

Yeah, I'm hoping there's an easier way. I'd have to put several thousand
entries in the pg_autovacuum table only to remove them a few minutes later.
What I really want is to disable the daemon.

Any idea why I can't just simply set autovacuum to off?

Steve


On 3/5/07, Tomas Vondra <tv@fuzzy.cz> wrote:
>
> If you want to disable it only for some tables, you can put special
> values into pg_autovacuum. This won't disable the autovacuum daemon, but
> some of the tables won't be vacuumed.
>
> Tomas
> > Not quite a performance question, but I can't seem to find a simple
> > answer to this. We're using 8.1.4 and the autovacuum daemon is
> > running every 40 seconds cycling between 3 databases. What is the
> > easiest way to disable the autovacuumer for a minute or two, do some
> > other work, then re-enable it? Do I have to modify postgresql.conf
> > and send a HUP signal to pick up the changes?
> >
> > I figured this would work but I can't find a reason why not:
> >
> > # show autovacuum;
> > autovacuum
> > ------------
> > on
> > (1 row)
> >
> > # set autovacuum to off;
> > ERROR: parameter "autovacuum" cannot be changed now
> >
> > In postgresql.conf:
> >
> > autovacuum = on
> >
> > Thanks,
> >
> > Steve
> >

>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com