Khan W
08/06/2021, 8:33 PMScott P
08/06/2021, 8:39 PMVACUUM FULL
while the table is in use as it will lock the table until the operation completes (meaning read and write operations against the table won't be able to run). It essentially rewrites the entire table into a new volume with no extra space, and the OS can then reclaim that space for other tasks.
Regular VACUUM
(without FULL
) won't lock the table, but the space it clears won't be returned to the operating system. It does make the space available to be reused by the DB though.
More details: https://www.postgresql.org/docs/9.4/sql-vacuum.htmlKhan W
08/06/2021, 9:56 PMKhan W
08/06/2021, 9:56 PMKosh
08/07/2021, 3:13 PMSELECT cron.schedule('nightly-vaccum','0 10 * * *', 'VACUUM');
would you consider this ok or not?Scott P
08/07/2021, 3:21 PMKosh
08/07/2021, 3:22 PMKosh
08/07/2021, 3:23 PMSELECT cron.schedule('nightly-vaccum','0 22 * * *', 'VACUUM');
okay, better now 🙈Scott P
08/07/2021, 3:23 PMKosh
08/07/2021, 3:24 PMKosh
08/07/2021, 3:24 PMScott P
08/07/2021, 3:24 PMKosh
08/07/2021, 3:25 PM