PDA

View Full Version : PostgresSql autovacuum



Isura
08-19-2009, 12:38 AM
Apparently the SQL thing has an autovacuum feature and it runs in the background whenever the database is updated. Is this feature enabled (I have version 8.4)? Does this eliminate the need for manual vacuums?

fozzy71
08-19-2009, 05:41 AM
No idea. I haven't heard about it, but even if it does, there is a lot more required for DB maintenance than just an occasional vacuum. Reindex and Defrag, being the other 2 most important steps IMO.

I surely wouldn't trust an automated vacuum to handle all my DB maintenance.

I will forward this to nestrak and see if he can offer assistance when he is online this evening. He is a bit mroe up to speed on SQL 8.4.

netsrak
08-19-2009, 01:18 PM
I'm not sure whether the autovacuum is active in 8.4 but i think so because it is active in 8.3.
You should see it when you look via pgadmin in the database server properties (not the database the server) there is a row Autovacuum at the bottom (at least in my version).

But this autovacuum is only the standard vacuum. It doesn't carry out a Vacuum/Full to restore harddisk capacity. So you still need to do a vacuum / Full and a reindex regularly (once a month or sth. like that)

Isura
08-19-2009, 02:16 PM
Actually I read in the documentation that daily normal vacuum is better for the DB than vacuum full. Maybe I'm confused though

http://www.postgresql.org/docs/8.4/static/maintenance.html

http://www.postgresql.org/docs/8.4/static/routine-vacuuming.html#AUTOVACUUM

netsrak
08-19-2009, 03:40 PM
Just try it, we are not the Postgresql system experts, we only work with it. And please let us know about the results :)

Isura
08-19-2009, 05:34 PM
The documentation says the setting is enabled. I have no idea if its' really working though. I'll keep doing manual maintenance until it's confirmed.