I've been working on optimizing tables in database. One of our table requires monthly vacuuming because of cleaning up processes.pg_squeeze Table size can get upto 25 GB. As this table is used by production users, we can't afford downtime every month to run VACUUM FULL
.
I found that pg_squeeze and pg_repack can be used for this purpose. But I'm not able to understand the difference between those two. Can someone please explain what is the difference and which will be more suitable for me to use?
Thank you.
CodePudding user response:
The main difference is that pg_queeze operates entirely inside the database, with no need for an external binary. It also has a background worker that will schedule table rewrites automatically if certain criteria are met.
So you could say that pg_repack is less invasive (for example, installation requires no restart of the database), but pg_squeeze is more feature complete.
Disclaimer: I work for the company who wrote pg_squeeze.