3 ms·
Is vacuumin postgres still basically means that you need downtime?
by 978e4721a 6y ago
Is vacuumin postgres still basically means that you need downtime?
- jojobas 6y agoVacuuming is online, with some performance hit while it's underway.
- tankenmate 6y agoThe latest release has multi-threaded vacuuming so it goes much quicker these days.
- hrpnk 6y agoAside of auto vacuuming, there is also VACUUM FULL [1] which does an exclusive lock on the table. If you look for an alternative option for reorganizing tables in online mode, try the pg_repack extension [2]. [1] https://www.postgresql.org/docs/current/sql-vacuum.html https://www.postgresql.org/docs/current/sql-vacuum.html [2] https://reorg.github.io/pg_repack/ https://reorg.github.io/pg_repack/
- kakwa_ 6y agoVacuum is online, but with a caveat iirc, it locks the table with a lock that does not block inserts/updates/reads. But if your application use exclusive locks, things can get blocked.