# GSOC 2020 , OpenMRS Should Support PostgreSQL

**URL:** <https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755>\
**Category:** GSoC\
**Tags:** development, gsoc2020\
**Created:** [May 30, 2020, 3:17pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755 "2020-05-30T15:17:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [May 30, 2020, 3:17pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/1 "2020-05-30T15:17:37Z")

</div>

This is the public thread for the GSOC 2020 project **OpenMRS Should Support PostgreSQL**. I’ll be sharing all the project details, problems I’ll face etc on this thread. Hoping to have a wonderful summer with this community. 🙂

Mentors : @dkayiwa , @jwnasambu

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 14, 2020, 8:21am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/2 "2020-08-14T08:21:44Z")

</div>

hello @aman

thanks for the great work and contribution your have done in the community 🤠

enabling openmrs to support postgre is part of the [road map](https://wiki.openmrs.org/display/docs/Technical+Roadmap) for `2.4.0 release,` i just wanted to inquire if this feature is fully ready? 😃

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 14, 2020, 8:29am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/3 "2020-08-14T08:29:40Z")

</div>

@gcliff , I am working on the last bug and will try to complete it by this weekend. 🙂

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 14, 2020, 8:35am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/4 "2020-08-14T08:35:07Z")

</div>

sounds awsome 👍 and once again thanks for the contribution

---

<div class="post-metadata">

**Author:** ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)\
**Post date:** [August 14, 2020, 8:49am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/5 "2020-08-14T08:49:08Z")

</div>

Thanks for clinging on and am glad you are remaining with few bugs and tests to fix ! we look forward to the end product and having you in the community even after the GSoC period.

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 14, 2020, 8:59am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/6 "2020-08-14T08:59:34Z")

</div>

Sure, you all are going to see me here for a long time 😃

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 19, 2020, 11:52am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/7 "2020-08-19T11:52:26Z")

</div>

hello @aman @dkayiwaam trying set up openmrs to run on postgre on windows environment however am having some [errors](https://pastebin.com/EkVrg6pV)  
I have done a fresh mvn clean build and then run `mvn jetty:run` in the webapp folder

postgre has been [install properly](https://pastebin.com/GumaRr9V) on my machine and activated in the windows Services .

What could i be missing here

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 19, 2020, 12:00pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/8 "2020-08-19T12:00:33Z")

</div>

@gcliff , Does this occur after initialization wizard of OpenMRS or before ? From the logs it appears that **0.0.0.0/0.0.0.0:8080** address is already in use. May be some other application is using that and thus jetty is not able to use it.

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 19, 2020, 12:05pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/9 "2020-08-19T12:05:10Z")

</div>

> [@aman](#):
>
> Does this occur after initialization wizard of OpenMRS or before ?

its before

> [@aman](#):
>
> May be some other application is using that and thus jetty is not able to use it.

i have re-started the machine but it still persists

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 19, 2020, 12:07pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/10 "2020-08-19T12:07:56Z")

</div>

@gcliff , while setting up PostgreSQL which Port Number did you set ? It is supposed to be 5432

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 19, 2020, 12:16pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/11 "2020-08-19T12:16:34Z")

</div>

> [@aman](#):
>
> while setting up PostgreSQL which Port Number did you set ? It is supposed to be 5432

YES when you look at my [postgre config file](https://pastebin.com/VahqFc1J) i set the port to 5432

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 19, 2020, 12:22pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/12 "2020-08-19T12:22:27Z")

</div>

Since port 8080 is being used, we can set the port dynamically for jetty. Try :

```auto
mvn jetty:run -Djetty.http.port=9999

```

And to see which application might be using 8080 port , you might want to hava a look here : [https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows](https://stackoverflow.com/questions/48198/how-can-you-find-out-which-process-is-listening-on-a-port-on-windows)

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 19, 2020, 2:28pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/13 "2020-08-19T14:28:36Z")

</div>

thanks @aman for the help ,salute 👮

am now up and running openmrs platform with postgres on windows 🤠

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [August 19, 2020, 2:44pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/14 "2020-08-19T14:44:39Z")

</div>

@gcliff can you now install the reference application modules and see how they behave on PostgreSQL?

---

<div class="post-metadata">

**Author:** ![aman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/aman/32/11436_2.png) [@aman](https://talk.openmrs.org/u/aman)\
**Post date:** [August 19, 2020, 6:48pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/15 "2020-08-19T18:48:45Z")

</div>

Hello everyone. This is the link to wiki page that I am using for documenting the project: [https://wiki.openmrs.org/display/docs/OpenMRS+Setup+On+PostgreSQL](https://wiki.openmrs.org/display/docs/OpenMRS+Setup+On+PostgreSQL) . Please have a look at it and give your suggestions. 🙂

cc. @dkayiwa @jwnasambu

---

<div class="post-metadata">

**Author:** ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)\
**Post date:** [August 19, 2020, 7:04pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/16 "2020-08-19T19:04:10Z")

</div>

Thanks for the good work @aman ! I have read through and followed the procedures highlighted and everything seem to be working well. my only worry is where the page is placed. I thought [this](https://wiki.openmrs.org/display/docs/OpenMRS+Setup+On+PostgreSQL) page will be fit at **Implementer documentation** under **installing openmrs** sub-section @dkayiwa what is your take?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [August 19, 2020, 11:12pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/17 "2020-08-19T23:12:30Z")

</div>

@jwnasambu did you try installing the reference application modules?

---

<div class="post-metadata">

**Author:** ![gcliff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gcliff/32/8783_2.png) [@gcliff](https://talk.openmrs.org/u/gcliff)\
**Post date:** [August 20, 2020, 1:37pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/18 "2020-08-20T13:37:18Z")

</div>

> [@dkayiwa](#):
>
> can you now install the reference application modules and see how they behave on PostgreSQL?

hello @dkayiwa @aman i have tested it out on reff app and it works

 ![postgre2](https://talk.openmrs.org/uploads/default/original/2X/c/cca4198ecafe8e4c66d563e77bab0987c15b96b3.png) ![pstgre1](https://talk.openmrs.org/uploads/default/original/2X/6/6055b3a79e0e4e312750ff868c2e68a48ae5bc12.png)

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [August 20, 2020, 7:02pm UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/19 "2020-08-20T19:02:56Z")

</div>

Yes the modules load. Did you also try to out the functionality as listed on the reference app user guide?

---

<div class="post-metadata">

**Author:** ![jwnasambu](https://talk.openmrs.org/user_avatar/talk.openmrs.org/jwnasambu/32/13543_2.png) [@jwnasambu](https://talk.openmrs.org/u/jwnasambu)\
**Post date:** [August 21, 2020, 9:19am UTC](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755/20 "2020-08-21T09:19:43Z")

</div>

Though still testing the functionality as listed by the reference application user guide, my UI looks a bit different after logging in as reflected on this snapshort

 ![openmrs UI](https://talk.openmrs.org/uploads/default/original/2X/1/15fb480e4fbe190a6855b8fde0e3aa5babeea7e7.png)

[Next page](https://talk.openmrs.org/t/gsoc-2020-openmrs-should-support-postgresql/28755.md?page=2)
