I know the question about disk space usage has been asked a few times, but I believe I’m seeing something that may be wrong. Our use case is a bit weird: we have two databases (
trading is used during the day, and at the end of the day, we copy the data from
trading_hist. Once the data is copied, we drop all tables in
trading and start over again next day with new tables (of the same names).
The log files for
trading are now taking 23GB space on a single node, while the data we store in it is approx 100MB each day. I’ve checked snapshots_to_keep is set to 2, and I’ve run
snapshot trading several times successfully. The initial log file size is the default 256MB, and there are 16 partitions, and we’re running with redundancy mode set to 2. I would still only expect 16x2x256MB = 8GB or so of disk space to be used once snapshots are taken. As of right now,
trading db is empty because we’ve dropped the tables, and I’ve run
snapshot trading several times, but it never frees any disk space.
I know our usage pattern is unusual, but any idea on how to truncate the log files? I can probably drop the database and recreate it, but then I assume I would have to re-grant privileges, and of course, I’d have to recreate all the stored procedures and functions.
Looking for advice. Thanks.