3 # Copyright (C) 2011 Sebastian Pop <sebpop@gmail.com>.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. A copy of this license
13 # can be downloaded from http://www.gnu.org/copyleft/gpl.html
16 rm -rf usr postgresql-9.0
.1
18 tar -xjf postgresql-9.0
.1.
tar.bz2
19 sed -i -e 's/__FAST_MATH__/foo_bar/g' $p/postgresql-9.0
.1/configure
20 sed -i -e 's/__FAST_MATH__/foo_bar/g' $p/postgresql-9.0
.1/src
/backend
/utils
/adt
/date.c
21 sed -i -e 's/__FAST_MATH__/foo_bar/g' $p/postgresql-9.0
.1/src
/backend
/utils
/adt
/timestamp.c
22 sed -i -e 's/__FAST_MATH__/foo_bar/g' $p/postgresql-9.0
.1/src
/interfaces
/ecpg
/pgtypeslib
/interval.c
23 sed -i -e 's/__FAST_MATH__/foo_bar/g' $p/postgresql-9.0
.1/src
/interfaces
/ecpg
/pgtypeslib
/timestamp.c
25 .
/configure
--prefix=$p/usr
--datadir=$p/usr
/data
--without-readline --without-zlib
26 make -j $procs CFLAGS
="$CFLAGS"
27 make -C contrib
/pgbench all
29 make -C contrib
/pgbench
install
30 $p/usr
/bin
/initdb
-D $p/usr
/data
/db
--encoding=SQL_ASCII
--locale=C
31 export PGDATA
=$p/usr
/data
/db
/
33 $p/usr
/bin
/pg_ctl start
-o '-c checkpoint_segments=8 -c autovacuum=false'
35 $p/usr
/bin
/createdb pgbench
36 $p/usr
/bin
/pgbench
-i -s $procs pgbench
39 $p/usr
/bin
/pgbench
-t 30000 -c `expr $procs / 2` pgbench
> $p/log
41 echo "pgbench run time: `echo "$after - $before" | bc`" >> $p/log
42 $p/usr
/bin
/dropdb pgbench
43 $p/usr
/bin
/pg_ctl stop
44 cd $p; rm -rf usr postgresql-9.0
.1