Warning We recommend you install PostgreSQL 9.2 and above. We currently run our continuous integration tests on PostgreSQL 9.2. The PostgreSQL downloads page has packages (for most systems) that set up everything for you.
sudo apt-get install postgresql
There are several good options:
- Postgres.app - Very easy for a development machine, requires zero configuration.
We have had good experiences with Postgres.app and Macports.
Some of the recommended settings below may not apply to older versions of PostgreSQL.
Most of the configurations below are made by updating the file
postgresql.conf, usually located in
The system works reasonably well with the default configuration. For better performance, we recommend to make the changes below.
You should only use either
UTF-8. If performance is an issue, the use of
SQL_ASCII is strongly recommended. 
Procedures to change character encoding to
SQL_ASCII in PostgreSQL 9.x:
you can check the expected screenshot here  .
Please check your server kernel setting
(use sudo if necessary)
by editing the file
and sourcing it
For better performance. Read Tuning your PostgreSQL Server for more information.
|Parameter||Suggested value (build)|
|shared_buffers||10-25% of RAM|
|work_mem||around 500MB but < 10% of RAM|
|maintenance_work_mem||5% of RAM but < 20% of RAM|
|effective_cache_size||50% of RAM|
Note that most of the changes above require starting postgres.
Note Depending on your system configuration (production or development), the type of sources used in the build (files or databases) and the load on your web application, you may need to increase the max_connections parameter (for example to 250).
You should also add a line to the pg_hba.conf file to allow logging in via password:
The InterMine system stores all text in the database in
UTF-8format. If you set PostgreSQL to
LATIN-9, then PostgreSQL will perform some incorrect conversions, and may even give an error. Setting the format to
UTF-8results in PostgreSQL treating the text completely correctly, which is quite a complicated and slow operation in
If you set PostgreSQL to
SQL_ASCII, then that is a special character set in Postgres, which basically means “do no conversions”. This is sufficient for almost all operations. All comparisons and index lookups will be done on a byte-by-byte basis, which is much faster than having to deal with Unicode’s complications.
Please try to treat InterMine as a black box. The fact that it uses PostgreSQL to store its data should be a detail that should be hidden as much as possible. The InterMine system is written in Java, and therefore handles all text in Unicode.
The template1 database is the database used as a template when you run the
createdbcommand. Update the encoding for template1 to be SQL_ASCII, then every database you create from now on will have the correct encoding.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';UPDATE 1postgres=# \c template0You are now connected to database "template0" as user "postgres".template0=# update pg_database set datistemplate = FALSE where datname = 'template1';UPDATE 1template0=# drop database template1;DROP DATABASEtemplate0=# create database template1 with template = template0 encoding = 'SQL_ASCII' LC_COLLATE='C' LC_CTYPE='C';CREATE DATABASEtemplate0=# update pg_database set datistemplate = TRUE where datname = 'template1';UPDATE 1template0=# \c template1You are now connected to database "template1" as user "postgres".template1=# update pg_database set datallowconn = FALSE where datname = 'template0';UPDATE 1
See also: HikariCP and InterMine settings