Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can someone explain the parameter autovacuum_naptime?

Tags:

postgresql

I read the explaination from official, But i'm still cant not understand the parameter well. Can someone explain the parameter autovacuum_naptime ? thanks a lot !

like image 624
francs Avatar asked Mar 15 '11 08:03

francs


1 Answers

It is the minimum time that postgresql wait between each auto vacuum.

Say for example you kept the default value of 1 minute, there will be at least 1 minute without vacuum after the last one finished.

The time is for each database separately and postgresql try to run as much vacuum as possible. So if you have 4 databases and the naptime value is 1 min, a vacuum process will run every 20 seconds in a new database.

I hope I'm clear, otherwise feel free to ask some details.

like image 176
krtek Avatar answered Sep 22 '22 14:09

krtek