# Postgres Minimum Version

**URL:** https://meta.discourse.org/t/postgres-minimum-version/98354
**Category:** Bug
**Created:** [September 29, 2018, 6:02pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354 "2018-09-29T18:02:15Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tmm1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tmm1/32/81412_2.png) [@tmm1](https://meta.discourse.org/u/tmm1)
#### Post date: [September 29, 2018, 6:02pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/1 "2018-09-29T18:02:16Z")

</div>

README states 9.3+ is required. But using 9.4.18 I am seeing errors in Jobs::UpdateUsername

> PG::UndefinedFunction: ERROR: function jsonb\_build\_object(unknown, text, unknown, text, unknown, text, unknown, text) does not exist  
> LINE 4: jsonb\_build\_object(

It appears that jsonb\_build\_object was added in 9.5

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 29, 2018, 6:26pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/2 "2018-09-29T18:26:17Z")

</div>

[Standard install](https://meta.discourse.org/t/142537?silent=true):

```
# psql --version
psql (PostgreSQL) 10.3 (Ubuntu 10.3-1.pgdg16.04+1

```

That’s what I’d recommend. You can search here, but I think 10 is required.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 29, 2018, 6:35pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/3 "2018-09-29T18:35:40Z")

</div>

@rishabh can you update readme as you have time.

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [September 30, 2018, 12:31pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/5 "2018-09-30T12:31:28Z")

</div>

I’ve updated `README.md` and a few other docs, Thanks @tmm1 👍

> [@pfaffman](#):
>
> You can search here, but I think 10 is required.

I’ve just bumped it from 9.3 to 9.5 for now because Ubuntu 16.04 still ships with 9.5 🤔

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 30, 2018, 1:17pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/6 "2018-09-30T13:17:49Z")

</div>

> [@rishabh](#):
>
> I’ve just bumped it from 9.3 to 9.5 for now because Ubuntu 16.04 still ships with 9.5 🤔

We should **really** point to 10, since it’s what we use on _every_ install.

PostgreSQL officially supports Ubuntu 16.04: [Apt - PostgreSQL wiki](https://wiki.postgresql.org/wiki/Apt)

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [September 30, 2018, 3:05pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/7 "2018-09-30T15:05:12Z")

</div>

Sure, I’ll change it back to 10!

I chose 9.5 because on a fresh 16.04 droplet:

`apt install postgres` → installs 9.5  
`apt install postgres-10` → doesn’t have an installation candidate

so our instructions here will not work on 16.04:  
[https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md#preparing-a-fresh-ubuntu-install](https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md#preparing-a-fresh-ubuntu-install)

Can I update that guide to say Postgres 10 & Ubuntu 18.04?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 30, 2018, 3:32pm UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/8 "2018-09-30T15:32:06Z")

</div>

> [@rishabh](#):
>
> Can I update that guide to say Postgres 10 & Ubuntu 18.04?

Yes, the guide should point to the official PostgreSQL docs for installation, so it will work in any distro/version.

---

<div class="post-metadata">

### Author: ![rishabh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rishabh/32/179446_2.png) [@rishabh](https://meta.discourse.org/u/rishabh)
#### Post date: [October 1, 2018, 4:26am UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/9 "2018-10-01T04:26:21Z")

</div>

> [@Falco](#):
>
> Yes, the guide should point to the official PostgreSQL docs for installation, so it will work in any distro/version.

Awesome, it is done: [Change postgres version 9.5 to 10 in docs/ and README.md · discourse/discourse@0dd9898 · GitHub](https://github.com/discourse/discourse/commit/0dd98982ebc1c44c81d6d3d441a9374893bc58c2) 🎈

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 1, 2018, 5:36am UTC](https://meta.discourse.org/t/postgres-minimum-version/98354/10 "2018-10-01T05:36:32Z")

</div>


