3
votes

Ive recently started tinkering with Google Cloud SQL - PostgreSQL.

I have created an empty database and over 4-5 days its storage usage has grown to over 20GB. Its just keeps going up, but there is no data in the database. Its not even being used.

Does anyone know what would be doing this and how to stop it?

enter image description here

2
There is not enough detail for any reasonable hypotheses other than "Problem: you started using the database" and to "Fix it: Stop using the database". Now that is not very useful to you, but gives you as much information as you provided. If you want an reasonable answer you must provide some details.Belayer
Thanks for your reply Belayer. Im not sure what other details i can supply. I literally spun up an new Cloud SQL Postgresql instance using default settings, created a database on it through the Google UI and then left it. Days later it was chewing through storageMatt
It would be better to open an Issue Tracker entry in a private component and provide your Project ID and the Cloud SQL instance that is problematic. Agents will be able to check what might be taking so much storage and what the best course of action will be. Just for information, usually, an instance can have some storage usage because of binary logs from updates and temporary files from operations and some system files.ddworks

2 Answers

7
votes

Yes, this is most likely due to Point-in-time recovery which will show an increase to your storage every few minutes. You are able to keep automated backups enabled while disabling point-in-time recovery. Once you disable it the binary logs will be deleted and you will notice an immediate reduction in storage usage. That said, according to the documentation: "The binary logs are automatically deleted with their associated automatic backup, which generally happens after about 7 days."

To disable point-in-time recovery:

  • Select your instance
  • Select Backups
  • Under Settings select Edit
  • Uncheck box for point-in-time recovery
3
votes

Most likely you have turned on the automated backups setting. You can confirm this by clicking the backups tab in your Cloud SQL instance. Be careful with disabling and deleting backups in case you will start using your database later!