← Back to team overview

openbravo-isv team mailing list archive

PostgreSQL shared memory

 

Hi Brian,

In order for some process of Openbravo ERP works correctly we need to
increase the shared memory of PostgreSQL.

By default the shared memory of the system is 32MB that is enough for
one instance of PostgreSQL, but the problem is that there is two
instances of PostgreSQL running at the same time: the System one and
the Openbravo ones.

The process to fix it should be similar to this:

# check the current shmmax assigned MB
echo $(cat /proc/sys/kernel/shmmax) / 1024 / 1024 | bc

If the result is less than 128 (recomended in PostgreSQL manuals [1])

# Increase it to 128 MB
sudo sh -c 'echo "kernel.shmmax = 134217728" >> /etc/sysctl.conf'
sudo sysctl -p

Brian,
How is the best way to manage this?
A message to the user? automate it in the package postinst script? ...

Thanks,
Gorka

[1] http://www.postgresql.org/docs/8.4/static/kernel-resources.html



Follow ups