this post was submitted on 14 Jul 2023
64 points (98.5% liked)
Lemmy Support
4650 readers
1 users here now
Support / questions about Lemmy.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can delete old entries from the table. The space will not be released to the filesystem automatically though, but you won't have to worry about it until enough days pass where it's filled up the same amount that was freed.
Im sure it couldn't be difficult to do a rolling purge to keep the file at a fixed size?
If you need the space back on the filesystem, you could rebuild the table with VACUUM FULL. Do note that the table would be unavailable during that process as it would be locked exclusively. https://www.postgresql.org/docs/current/sql-vacuum.html
You'd need to take your site down for a while since write access is necessary to that table to avoid duplicates. But yeah, once you've done a vacuum full you could find a way to each day trim old entries.
Entries older than 6 months are deleted by default, but as far as I understand it might be safe to manually delete them sooner than that?
I'm purging much more aggressively than that an so far so good.
Good to know, thanks! I have space to spare, but I'll probably make it more aggressive to save on backup size