Google Cloud SQL - Postgresql storage keeps growing
Asked Answered
D

2

7

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

Disorder answered 21/7, 2020 at 11:50 Comment(3)
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.Rendering
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 storageDisorder
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.Pedicle
R
15

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
Rora answered 24/7, 2020 at 20:50 Comment(0)
A
4

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!

Albur answered 22/7, 2020 at 21:20 Comment(3)
Specifically (as in the other answer) I had Point-in-time enabled. After disabling it, my storage usage went from 40 GB (!) to 1 GBHeyde
Backups should not and do not take up storage usage space as shown in the Storage Usage graph. They are kept separatelyGriffie
After only disabling & deleting automated backups, 99.9% of my stored data was gone. Not sure what could have coincidentally caused that to happen at the very same time?Albur

© 2022 - 2024 — McMap. All rights reserved.