Openbravo supports PostgreSQL as its database engine.
For the specific versions supported and the currently recommended version check the System Requirements.
In general you should never pick a version lower then the recommended ones, but are free to pick higher version if they are supported.
In addition to the PostgreSQL server the the UUID contrib package is required.
PostgreSQL documentation and tutorials are available at:
Required PostgreSQL extensions
Openbravo currently requires two PostgreSQL extensions to be available:
- uuid-ossp to generate UUID's
- pg_trgm to have index support for fast contains search
For major versions <10 those are found in the contrib modules which need to be installed additionally. Since version 10 those are part of the normal PostgreSQL server installation.
Config file changes
Openbravo requires a few specific setting done to the main PostgreSQL configuration.
Setting up the numeric locale
The lc_numeric setting should be configured as follows:
lc_numeric = 'en_US.UTF-8'
When running PostgreSQL on windows the equivalent setting is slightly different
lc_numeric = 'English_United States.1252'
The default value 64 of max_locks_per_transaction config setting must be increased to at least 128.
max_locks_per_transaction = 128
Required user accounts
Openbravo requires access to both a normal non-privileged user account it creates itself during installation as well as the superuser account.
During normal operation only the standard user account is used. However both the installation and update process also requires access to the superuser (to be able to create and update PostgreSQL extensions).
As the normal user account will be created by the Openbravo installation only required setup is to set a password for the superuser account (and configure that later in the Openbravo.properties config file).
Example install on Ubuntu 18.04 LTS
This example outlines the above using on Ubuntu linux.
Install PostgreSQL 10:
apt-get install postgresql-10
Create new file /etc/postgresql/10/main/conf.d/00-openbravo-minimum.conf with following content
lc_numeric = 'en_US.UTF-8' max_locks_per_transaction = 128
Restart postgres and set superuser passwordvalue)
pg_ctlcluster 10 main restart sudo su - postgres -c psql \password <enter password twice> \quit exit
Installing PostgreSQL on Microsoft Windows
Follow the instructions on the PostgreSQL wiki.
On the PostgreSQL download page there is an installer available which also directly includes the UUID extension mentioned as required above.
At the end of using this installer it will ask to optionally launch a 'StackBuilder' program to install more Addon software. None of this its required for Openbravo so that step can be safely skipped.