Skip to content

Instantly share code, notes, and snippets.

@filipebarcos
Created September 5, 2013 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipebarcos/6454136 to your computer and use it in GitHub Desktop.
Save filipebarcos/6454136 to your computer and use it in GitHub Desktop.
#! /bin/bash
#with your postgresql setup up, with you postgres user too, let's do this o improve your postgresql performance
cd ~
wget http://pgfoundry.org/frs/download.php/2449/pgtune-0.9.3.tar.gz
tar -zxvf pgtune-0.9.3.tar.gz
cd pgtune-0.9.3
#first parameter is where your postgresql.conf is
./pgtune -i /etc/postgresql/9.0/main/postgresql.conf -o ~/postgresql.conf.pgtune --type Web
cp /etc/postgresql/9.0/main/postgresql.conf /etc/postgresql/9.0/main/postgresql.conf.bkp
cp -f ~/postgresql.conf.pgtune /etc/postgresql/9.0/main/postgresql.conf
sudo su postgres
pg_ctlcluster 9.0 main reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment