I have a couple of tables in a PostgreSQL database which are used very frequently (for Insert/Delete purposes). Sometimes, their size of the tables grow up to GB's. How do I reclaim the disk space from these tables without locking them. These tables need to be used almost all the times so I can't afford getting them locked. VACUUM FULL reclaims the disk space however locks the table so I can't use FULL option.
Can someone please suggest a way?
Thanks
Often you can avoid the problem by configuring autovacuum sufficiently aggressive that it can keep up with the change rate.
If that doesn't do the trick, or if you have regular mass DELETEs, look into a tool like pg_squeeze or pg_repack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With