Remove bloat from merge_request_diff_files
Once we've cleaned up merge_request_diff_files
we'll have a lot of bloat in the table. autovacuum is going to reclaim that space and eventually new inserts/updates are going to use this. However, we'll be stuck with a 700GB monster of a table for a long time while in reality, this could be much smaller.
The question here is how to remove this bloat and if that is possible without downtime.
The straight forward solution of VACUUM FULL merge_request_diff_files
is going to lock and rewrite the whole table - which would cause downtime. Do we have a better solution (concurrently rebuilding the table on the sides?)?
The benefit from a smaller table will be noticeable, e.g. in backups or recovery times for building a secondary and so on.