Hi everyone,
We're self-hosting the Prefect server with PostgreSQL as the database.
Does the Prefect server manage database retention and cleanup automatically?
We're noticing high CPU usage, likely due to cancellation cleanup. I suspect this process is resource-intensive, especially with six months of flow history that no one needs.
Should we configure our own DB cleanup for PostgreSQL, or does the server handle it?
Thanks!
b
Bianca Hoch
03/12/2025, 9:37 PM
Hi Oz! To my knowledge, Prefect server doesn't have any auto clean-up features at the moment. You'd need to implement your own cleanup process to address this. You could write a script that periodically checks for data older than 50+ days, and then deletes those records. 🤔 The REST API may be helpful for that.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.