Dec 31, 2021
JPC HA detailed install guide
Simple JChem PostgreSQL Cartridge highly available setup. It does not contain any specific
configuration related to database size (e.g. number of structures), or performance tuning.
Use it as a starting point for highly available setup followed by custom settings.
Table of contents:
Create highly available PostgreSQL using binary replication
Install Cartridge
Security considerations
Import 80 test molecules for testing purposes
Create highly available PostgreSQL using binary replication
Install postgres on both servers:
Install postgreSQL 12 database engine as root:
wget --quiet -O -
https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo
apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/
`lsb_release -cs`-pgdg main" |sudo tee
/etc/apt/sources.list.d/pgdg.list
apt update
apt -y install postgresql-12 postgresql-client-12
On a master machine:
As root.
Modify postgresql.conf to listen on all addresses:
listen_addresses = '*'
Create rep user in master db:
CREATE USER rep REPLICATION PASSWORD 'reppass';
Edit pg_hba file on master machine:
host replication rep 10.0.112.58/32 md5
Restart postgres on master machine: