Support For PostgreSQL

+1 to @dkayiwa’s comment, and to @teleivo’s desire to help with this! I’ve always been in the prefers-postgres camp, and I’d love to see OpenMRS run on PostgreSQL.

There are two steps in the process:

  1. Manually make lots of fixes to ensure the application works with $database
  2. Add CI plans so this is constantly tested, and if this breaks, we know quickly

For MariaDB, step 1 was trivial (due to its near-equivalence to MySQL), but for PostgreSQL, step 1 will be big. It would be great if you can start looking into this.

I would suggest that the first step is to try a clean installation where in the first-time setup wizard you point it to a postgres install instead of mysql. I expect this will fail, because the liquibase changesets added since 1.9 don’t support postgres.

Once you’ve identified some of the errors, it’s likely that the fixes to these are similar to things that @sunbiz did years back. (There must be a commit against the liquibase-update-to-latest.xml file by him that mentions postgres in the commit comment.)

Then we’ll need to look at all the modules bundled in OpenMRS 2.2 and ensure they similarly work with postgres. (I expect this will be easy for most modules, but hard for the reporting module.)

Let us know how it goes!

1 Like