From: Henrik Cednert (Filmlance) []
Sent: Tuesday, November 21, 2017 11:48 AM
Subject: Re: pg_dump 3 times as slow after 8.4 -> 9.5 upgrade

I VACUUM every sunday so that is done already. =/

Not sure I have the proper params though since I'm not used to db's but have 
followed other's "how to's", but these are the lines in my script for that;

${BINARY_PATH}/vacuumdb --analyze --host=localhost --username=postgres --echo 
--verbose --no-password ${database} | tee -a ${log_pg_optimize}_${database}.log
${BINARY_PATH}/reindexdb --host=localhost --username=postgres --no-password 
--echo ${database} | tee -a ${log_pg_optimize}_${database}.log

Henrik Cednert
cto | compositor

Filmlance International
mobile [ + 46 (0)704 71 89 54 ]
skype  [ cednert ]


To do vacuum full you need to add –full option to your vacuumdb command:

${BINARY_PATH}/vacuumdb --full --analyze --host=localhost --username=postgres 
--echo --verbose --no-password ${database} | tee -a 

Just be aware that “vacuum full” locks tables unlike just analyze”.  So, like I 
said, no other acivity during this process.


Reply via email to