Database cleanup

Hi All,

I am new to Sentry. I have installed sentry in my office and it is working fine.

The problem is the sentry database (Postgres). It is growing daily. Now the database is occupied 34 GB.

I have put the cron entry to cleanup for every 15 Days

/opt/sentry/bin/sentry cleanup --days=15

Even though the database is not shrinking.

I could see one month old issue also but 15 days old issue enough for me.

Please give me your valuable suggestion to free up disk space.

Thanks in Advance.

1 Like

Postgres will not reclaim disk space without an offline operation, and to be honest, you’re going to need pretty significant storage if you have any reasonable throughput. Generally it shouldn’t grow much if your usage isnt growing and you’re running the cleanup continuously.

Hi,
Thanks for your valuable reply.

How can i reclaim the disk space with offline operation. Kindly send me the step by step.

It will will helpful for me.

Thanks in Advance.

With Postgres, you can try by running a VACUUM FULL. This will lock the entire database while this happens rendering it completely useless for potentially many many hours. This still doesn’t guarantee freeing up space if you legitimately have lots of data.

I will also note, please please read documentation about this about Postgres. VACUUM FULL is not something that you want to run regularly and is usually an indication of a problem. Normal autovacuuming should be enough to keep things chill unless previously you weren’t running cleanup, and you just now ran it.

I use vacuumdb -U postgres -d postgres -v -f --analyze :joy: