Hey for anyone who may need it; if your postgres s...
# off-topic
k
Hey for anyone who may need it; if your postgres storage is filling up on not much data run a vacuum to restore everything. I went from 200mb to 50mb stored in one table
s
Be careful not to run a
VACUUM 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.html
k
^^^
+1
k
I have a nightly vaccume actually.
Copy code
SELECT cron.schedule('nightly-vaccum','0 10 * * *', 'VACUUM');
would you consider this ok or not?
s
I don't see any problems with that (assuming you want it to run at 10am). As far as I know, a cron like that is pretty common.
k
10am? I believe its 10PM 😄
Copy code
SELECT cron.schedule('nightly-vaccum','0 22 * * *', 'VACUUM');
okay, better now 🙈
s
vs
k
yeep. haha. thanks 🙂
could you share the website 🙈
s
k
thank you 🙂