Skip to content

Commit

Permalink
skipping pgsql tune up for now
Browse files Browse the repository at this point in the history
  • Loading branch information
fagiani committed Jan 21, 2012
1 parent 08e0234 commit a53a088
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/postgresql.sh
Expand Up @@ -13,7 +13,7 @@ function tune_postgresql
# Tunes PostgreSQL's memory usage to utilize the percentage of memory you
# specify, defaulting to 30%
#
# $1 - the percent of system memory to allocate towards MySQL
# $1 - the percent of system memory to allocate towards PgSQL
if [ -z "$1" ] ; then
PERCENT=30
else
Expand All @@ -24,6 +24,7 @@ function tune_postgresql

pg_conf=$(find /etc/ -name "postgresql.conf" | head -n 1)
sed -i -e 's/^.*shared_buffers.*$/shared_buffers = '$PGMEM'MB/g' $pg_conf
#there is still need to increase SHMMAX at /proc/sys/kernel/shmmax in order to work but not sure on how much to automate
/etc/init.d/postgresql restart
}

Expand Down
4 changes: 2 additions & 2 deletions recipes/rails
Expand Up @@ -33,11 +33,11 @@ function install_rails {
install_mysql $DATABASE_PASSWORD && tune_mysql 40
;;
pgsql)
install_postgresql $DATABASE_PASSWORD && tune_postgresql 30
install_postgresql $DATABASE_PASSWORD
;;
*)
install_mysql $DATABASE_PASSWORD && tune_mysql 40
install_postgresql $DATABASE_PASSWORD && tune_postgresql 30
install_postgresql $DATABASE_PASSWORD
;;
esac
}

0 comments on commit a53a088

Please sign in to comment.