Question

Do managed postgres databases run the autovacuum demon?

As described here - https://www.postgresql.org/docs/current/routine-vacuuming.html#AUTOVACUUM

I didn’t see any mention in the DigitalOcean docs, so I assume not, but wanted to make sure - I’m new to pg and not sure what is standard.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I reached out to support some time back with that very question

Currently, in our managed Postgres database we have autovacuum enabled and below are some of the values we have set for the parameters that affect autovacuum 

autovacuum_analyze_scale_factor | 0.1 

autovacuum_analyze_threshold | 50

autovacuum_freeze_max_age | 1000000000 

autovacuum_max_workers | 3 

autovacuum_naptime | 60 s

autovacuum_vacuum_cost_delay | 20 ms

autovacuum_vacuum_cost_limit | -1

autovacuum_vacuum_scale_factor | 0.2

autovacuum_vacuum_threshold | 50

maintenance_work_mem | 154624 kB

vacuum_cost_limit | 200

vacuum_freeze_min_age | 50000000

I think the answer is yes. Anyways it would be nice to have confirmation from official side.

According to this documentation page and as pistle2020 says, the autovacuum deamon is enabled, if the postgres config param ‘autovacuum’ is on.

According to this documentation page, autovacuum only runs, if ‘track_counts’ is on.

Run the following sql queries on your db to find out:

SHOW autovacuum;
SHOW track_counts;

On my fresh instance of digital ocean postgres v13 both queries return:

> on

To find out more about the inner cofiguration of autovacuum, you can output other params listed in the above documentation pages, as e.g.:

SHOW log_autovacuum_min_duration;
SHOW autovacuum_max_workers;
SHOW autovacuum_naptime;

Would also like to know! How do we add autovacuum to a DO Managed Database?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel