For some reason my database space usage keeps incr...
# help
d
For some reason my database space usage keeps increasing. A few days ago it was at 9.76 MB but in a matter of days it went to 42.28 MB. The strange thing is that no data has been added to the database. Can someone help me figure out what's happening? (while typing this question the usage went up to 42.29 MB)
Here are the estimated sizes of each table
g
Possibly all the logs
s
I've noticed this behaviour too on one of my recent self-hosted instances with an 80GB disk. Over the past 14 days, my disk usage has gone from 20% to 50%. It looks like the
postgresql.csv
logfile is the cause. Deleting this brought my disk usage back down to its previous 20% level. I wonder if this is having an effect on the managed instances that are hosted on the Supabase platform. With the integration of logging a few months ago, perhaps the config of these instances needs adjusting to avoid situations like this. Setting log_rotation_age and log_rotation_size might be all that's needed. Just to add, I don't think this was happening with a self-hosted instance I setup last year, though I modified the postgres config file and don't remember whether I adjusted the logging settings or if it was already setup.
d
I see. Thanks for the insight!
I'm not running a self-hosted instance. Is there anything I can do right now to fix this?
g
I believe Supabase has limits on log file size for hosted. I've seen a comment from them on that. You probably just have not hit the max size of files yet.
d
Oh okay. Thank you
h
its postgres logs it logs all statements, you can turn that off in the container /etc/postgres/postgres.conf
s
Yeah, that's a good point. It seems like it logs even queries that are running in the background (since even with no active queries running, the file size continues to grow and shows references to parts of postgres that wouldn't be touched by regular queries)