How did I reduce my Sentry database's size?

I have found that my Sentry database is too big:

2024-01-08--18-14-05

How do I check how much storage space is used by every Docker volume?

It it reflected in the big size of the /var/lib/docker/overlay2 folder:
2024-01-08--11-09-06

Step 1

cd /usr/local/sentry

Step 2

docker-compose exec worker bash

2024-01-08--20-19-02

Step 3

sentry cleanup --days 30

It took 12.5 hours to make my 50Gb database a half smaller.
My servers uses 2 SATA SSD in a RAID.

Step 4

exit

2024-01-09--11-37-06

Step 5

Connect to the Sentry's database in Docker via docker-compose exec.

Step 6

VACUUM FULL;

2024-01-09--11-59-50

Step 7. Checking the result via PostgreSQL

How to find big tables of the Sentry's database?

2024-01-09--12-01-41

Step 8. Checking the result via Docker

How do I check how much storage space is used by every Docker volume?
2024-01-09--12-06-20

See also: