restart_with_wo_cache_drop.sh
application/x-shellscript
Filename: restart_with_wo_cache_drop.sh
Type: application/x-shellscript
Part: 0
#!/usr/bin/env sh PG_INSTALL_BIN='../install/bin' PG_DATA='../data' PG_CONF='../data/postgresql.conf' $PG_INSTALL_BIN/pg_ctl -D $PG_DATA stop ##echo sync.. #sudo sync ##echo drop_caches.. #sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $PG_INSTALL_BIN/pg_ctl -D $PG_DATA start -l logfile echo cold_cache echo $PG_INSTALL_BIN/psql -h localhost -p 5433 -d postgres -c 'select count(*) from t1' $PG_INSTALL_BIN/psql -h localhost -p 5433 -d postgres -c 'vacuum (VERBOSE) t1'