Postgres 9.6 upgrade

Description

  • As odoo 10 is using Postgres 9.6 upgrade Bahmni Postgres from 9.5 to 9.6

Activity

Show:
Shilpa Parab
January 8, 2019, 6:50 AM

Please note after updating PostgreSQL to 9.6 was getting below error in bahmni install command:
TASK [bahmni-lab : Run openelis liquibase migrations of implementation config]
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-lab/tasks/main.yml:102
fatal: [localhost]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 255, "stderr": "+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION_NAME=default\n++ OPENMRS_DB_USERNAME=openmrs-user\n++ OPENMRS_DB_PASSWORD=password\n++ OPENMRS_DB_SERVER=localhost\n++ OPENELIS_DB_USERNAME=clinlims\n++ OPENELIS_DB_PASSWORD=password\n++ OPENELIS_DB_SERVER=localhost\n++ MYSQL_ROOT_USER=root\n++ MYSQL_ROOT_PASSWORD=password\n++ REPORTS_DB_SERVER=localhost\n++ REPORTS_DB_PASSWORD=password\n++ REPORTS_DB_USERNAME=reports-user\n+ CHANGE_LOG_TABLE='-Dliquibase.databaseChangeLogTableName=databasechangelog -Dliquibase.databaseChangeLogLockTableName=databasechangeloglock'\n+ LIQUIBASE_JAR=/opt/bahmni-lab/migrations/liquibase/lib/liquibase-1.9.5.jar\n+ DRIVER=org.postgresql.Driver\n+ CHANGE_LOG_FILE=liquibase.xml\n++ ls /opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar\n+ CLASSPATH=/opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar\n+ '[' -f /var/www/bahmni_config/openelis/migrations/liquibase.xml ']'\n+ cd /var/www/bahmni_config/openelis/migrations\n+ java -Dliquibase.databaseChangeLogTableName=databasechangelog -Dliquibase.databaseChangeLogLockTableName=databasechangeloglock -jar /opt/bahmni-lab/migrations/liquibase/lib/liquibase-1.9.5.jar --classpath=/opt/bahmni-lab/bahmni-lab/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar --driver=org.postgresql.Driver --changeLogFile=liquibase.xml --defaultSchemaName=clinlims --url=jdbcostgresql://localhost:5432/clinlims --username=clinlims --password=password update\n", "stdout": "Migration Failed: Error executing SQL CREATE TABLE clinlims.databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))\n", "stdout_lines": ["Migration Failed: Error executing SQL CREATE TABLE clinlims.databasechangeloglock (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED TIMESTAMP WITH TIME ZONE, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))"]}
So updated PostgreSQL JDBC driver in OpenElis repo to latest "postgresql-42.2.5.jar"

Ivange Larry
April 1, 2019, 11:36 AM

Installed bahmni using the 92-61 installer. It comes with psql (PostgreSQL) 9.6.12 installed and working as expected.

Himabindu Akkinepalli
April 17, 2019, 10:08 AM
Edited

The below commit needs to be cherry-picked to master. But we are not doing this now as master still pointing to postgresql-9.2 version.
https://github.com/Bahmni/OpenElis/commit/c0b2772053618ed26609665cb3c00e19ea94666e
Moving this to backlog as it needs to be tested for bahmni 0.93

Fixed

Assignee

Ivange Larry

Reporter

Rajashri Pritam Khobragade

Labels

None

Units

None

PercentDone

None

DueTime

None

Clients

None

External issue ID

None

UAT Assignee

None

Reviewer

None

Sprint

0.93 Product M3

Fix versions

Configure