1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/bin/sh
# Run this script in a postgresql.git checkout
set -eux
PGHOME=/usr/local/pgsql
PGDATA=$PGHOME/data
PGLOG=$PGDATA/log
PGBIN=$PGHOME/bin
# check we are in the correct directory before invoking git clean
grep 'PostgreSQL Database Management System' README
git clean -xdf
./configure --enable-cassert
make -j$(nproc)
make install
PATH=$PGBIN:$PATH
pg_ctl -D $PGDATA stop || :
rm -rf $PGDATA
initdb -D $PGDATA
cat >> $PGDATA/postgresql.conf <<EOF
port = 5430
unix_socket_directories = '/tmp'
fsync = off
EOF
pg_ctl -D $PGDATA -l $PGLOG start
PGHOST=/tmp PGPORT=5430 make installcheck
|