(unnamed)

text/plain

Filename: (unnamed)
Type: text/plain
Part: 1
Message: Re: [HACKERS] WAL logging problem in 9.4.3?
#! /usr/bin/bash

if [ "$PGDATA" == "" ]; then
	echo "\$PGDATA should be set"
	exit;
fi;

rm -r $PGDATA/*

initdb
if [ "$3" == "n" ]; then
	wal_level=replica
else
	wal_level=minimal
fi	
cat <<EOF >> $PGDATA/postgresql.conf
wal_level=$wal_level
max_wal_senders=0
log_checkpoints=yes
max_wal_size = 10GB
EOF
	
binary=`which postgres`
scale=$4
echo "## params: count=$1 pages=$2 mode=$3 binary=$binary scale=$scale wal_level=$wal_level"
pg_ctl stop -m f
pg_ctl start 2>&1
pgbench -i -s ${scale}
psql -c 'checkpoint;'
((sleep 30; echo "START"; ./bench1.pl 5 $1 $2 $3; echo "END") & pgbench -rP1 --progress-timestamp -T150 -c10 -j10) 2>&1
pg_ctl stop -m i