pg_crashtest_client.sh
application/x-shellscript
Filename: pg_crashtest_client.sh
Type: application/x-shellscript
Part: 0
Message:
Directory fsync and other fun
#echo 'checkpoint;DROP DATABASE IF EXISTS^Cest;CREATE DATABASE test TEMPLATE crashtemplate;checkpoint;'|echo psql -h /tmp -p 5433 postgres;echo sudo dmsetup suspend --nolockfs --noflush teststop;echo sudo dmsetup remove -f teststop psql -h /tmp -p 5433 postgres <<EOF CHECKPOINT; DROP DATABASE IF EXISTS test; CREATE DATABASE test TEMPLATE crashtemplate; CHECKPOINT; EOF #Immediately suspend all io without any cache flushes or such sudo dmsetup suspend --nolockfs --noflush teststop; #Replace device by an error device so that the fs can be unmounted timely sudo dmsetup remove -f teststop