Skip to content

Instantly share code, notes, and snippets.

@PlenipotentSS
Last active March 17, 2016 06:57
Show Gist options
  • Save PlenipotentSS/afd898126a98144f4218 to your computer and use it in GitHub Desktop.
Save PlenipotentSS/afd898126a98144f4218 to your computer and use it in GitHub Desktop.
PG Travis Tools Simple PGVersion startup
#!/bin/bash
# continued from https://gist.github.com/jasonmp85/9963879
set -eux
# Create fully-trusting cluster on custom port, owned by us
sudo pg_createcluster $PGVERSION test -p 55435 -u `whoami` -- -A trust
# Preload library if asked to do so
if [ ${PG_PRELOAD+1} ]
then
echo "shared_preload_libraries = '$PG_PRELOAD'" >> \
/etc/postgresql/$PGVERSION/test/postgresql.conf
fi
# Start cluster
sudo pg_ctlcluster $PGVERSION test start
#output psql version
psql --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment