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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.