Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

skipping pgsql tune up for now

  • Loading branch information...
commit a53a088594a09af7c28219b016706a55ce5aef6b 1 parent 08e0234
@fagiani authored
Showing with 4 additions and 3 deletions.
  1. +2 −1  lib/postgresql.sh
  2. +2 −2 recipes/rails
View
3  lib/postgresql.sh
@@ -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
@@ -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
}
View
4 recipes/rails
@@ -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
}
Please sign in to comment.
Something went wrong with that request. Please try again.