How to clear the logs older than 1 month ?
-
is there a way to limit the logs data let say i want to delete all the logs older than 1 month
-
Also, would it be possible to enable the Discussions section on GitHub? I originally wanted to bring this up as a discussion rather than an issue, but since Discussions isn’t enabled, I had to create it as an issue instead.
Just wanted to mention this in case others have similar feedback or general questions that aren’t bug reports.
Hi! We are working on a ticket that will do this for you, but you can set a TTL on the tables and they will automatically clear out after the TTL expires.
ALTER TABLE my_table MODIFY TTL timestamp + INTERVAL 30 DAY;
Note: This will immediately start deleting old data and potentially cause performance issues in the process. If you wanted to change that behavior, you can set SET materialize_ttl_after_modify=0; prior.
More details here: https://clickhouse.com/docs/guides/developer/ttl
Regarding discussions in GitHub, I'll bring that up with the team, but we've had a lot of success with discussions taking place in our public discord as well.
Thanks
Absolutely! Discussions on GitHub are permanent and easy to search through. Not everyone uses Discord, and it's often difficult to find specific solutions there.
With GitHub discussions, if an issue has already been addressed, it's quick and simple to find the answer.
This also helps prevent people from asking the same questions repeatedly since they can easily refer to previous discussions.