Question

Temporarily Increase Managed Database Disk Size

Hi, my app uses a Digital Ocean managed postgres cluster on a basic plan with 30 gb data. Every month I need to replace around 15-17 gb of data by uploading this month’s data. I need to keep last month’s data around before I confirm everything is working with the new month’s data. As a result, I temporarily need more than 30 gb worth of disk space on the cluster. I’m wondering the best way to solve this problem without having to pay for the next tier with 60gb of data. I’m thinking I’d have to resize the cluster, upload the data, run tests, delete last month’s data, and downsize the cluster. The resizing seems kind of like a hassle and I’m not sure if it would create downtime for the database. Hoping someone may have some advice on this. Thanks in advance!


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.

Bobby Iliev
Site Moderator
Site Moderator badge
July 19, 2023

Hello,

As of the time being, you cannot resize cluster nodes to smaller sizes as described in the docs here:

https://docs.digitalocean.com/products/databases/postgresql/details/limits/

Given the constraint that you can’t downsize a managed cluster once it has been upsized, here’s a couple of options you might consider:

  1. You can create a temporary managed cluster, upsized to accommodate the additional data. Import the new month’s data into the temporary cluster, run your tests, and when you’re confident that everything works as expected, you can migrate the data from the temporary cluster to your primary cluster, replacing the old data. This avoids potential downtime and allows you to only incur the cost of the larger cluster for the period required to validate the new data.

  2. If possible, consider updating the data incrementally rather than replacing the entire set each time. This may reduce your temporary storage requirements. It may require more complex data handling (like versioning of your data), but could be less costly in terms of resources.

  3. Another option is to use an external storage solution (like the DigitalOcean Spaces) to temporarily store your data. You can validate the data while it’s in the external storage, then transfer it to your database once you’re ready to replace the old data.

As you mentioned, an option is to scale up to a larger cluster so that you would be able to store all of the data at all time.

Hope that this helps!

Best,

Bobby

Bobby Iliev
Site Moderator
Site Moderator badge
October 3, 2023

Hi there,

In addition to what has already been mentioned here, you can now add scalable storage to managed database clusters as shown in this video here:

Best,

Bobby

Try DigitalOcean for free

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

Sign up

Featured on Community

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