`pg_repack` doubling project storage
Apologies for the double post, but this issue is time-sensitive and we need to determine the correct approach promptly. I previously posted ❓|questions-and-answersFree up storage with `pg_repack` requesting guidance regarding
Summary
By the time I posted the issue yesterday our project’s total storage was approximately 1.5 GB, with the main database initially around 900 MB. The project contains a single branch and two databases, though one of them has no data.
After running
We have a specific use case where we routinely ingest data from an external source but only need to retain the most recent X days. Without periodic cleanup, the database could grow to hundreds or even thousands of gigabytes. Because of this, it is essential that cleanup operations function consistently and that we understand why storage usage increased after running
Any help or guidance would be highly appreciated.
pg_repack, as we observed an unexpected increase in storage usage after running it.Summary
By the time I posted the issue yesterday our project’s total storage was approximately 1.5 GB, with the main database initially around 900 MB. The project contains a single branch and two databases, though one of them has no data.
After running
pg_repack, the database size successfully decreased from ~900 MB to ~300 MB, which is the expected result. Initially, the project dashboard continued to show 1.5 GB of storage usage, which was acceptable. However, a few hours later, the dashboard reported 2.45 GB of storage consumption, even though the database still remains at ~300 MB.We have a specific use case where we routinely ingest data from an external source but only need to retain the most recent X days. Without periodic cleanup, the database could grow to hundreds or even thousands of gigabytes. Because of this, it is essential that cleanup operations function consistently and that we understand why storage usage increased after running
pg_repack.Any help or guidance would be highly appreciated.
