# What version of Postgres should I be using on 1.6+

**URL:** https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177
**Category:** Self-hosting
**Created:** [August 25, 2016, 1:44am UTC](https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177 "2016-08-25T01:44:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [August 25, 2016, 1:44am UTC](https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177/1 "2016-08-25T01:44:17Z")

</div>

There was a major docker upgrade about 1-2 months ago, and I think it upgraded to postgres 9.5?

I just did a `./launcher rebuild app` today and saw that postgres 9.3 is in use…

```plaintext
:/var/discourse# ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2016-08-25T01:35:26.444275 #13] INFO -- : Loading --stdin
I, [2016-08-25T01:35:26.452811 #13] INFO -- : > echo cron is now included in base image, remove from templates
I, [2016-08-25T01:35:26.454853 #13] INFO -- : cron is now included in base image, remove from templates

I, [2016-08-25T01:35:26.455114 #13] INFO -- : > apt-get remove -y postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5
I, [2016-08-25T01:35:29.102101 #13] INFO -- : Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  postgresql-9.5 postgresql-client-9.5 postgresql-contrib-9.5
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 26.0 MB disk space will be freed.
(Reading database ... 34207 files and directories currently installed.)
Removing postgresql-contrib-9.5 (9.5.3-1.pgdg16.04+1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken
Removing postgresql-9.5 (9.5.3-1.pgdg16.04+1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Removing postgresql-client-9.5 (9.5.3-1.pgdg16.04+1) ...
Processing triggers for postgresql-common (174.pgdg16.04+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:

I, [2016-08-25T01:35:29.103654 #13] INFO -- : > apt-get update && apt-get install -y postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
dpkg-preconfigure: unable to re-open stdin: 
I, [2016-08-25T01:35:40.684581 #13] INFO -- : Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease

```

(the logs continue normally, and the site is up & running now.

But I wonder.. did I skip a step in the recent upgrade, and if so, what changes do I need to make (ostensibly in my `app.yml`)?

Thanks!

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [August 25, 2016, 1:51am UTC](https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177/2 "2016-08-25T01:51:02Z")

</div>

In general, you should be running PostgreSQL 9.5.

The commands that `pups` ran are only present in the `postgres.9.3.template.yml` file; presumably, somewhere in your container definition you’ve got something that looks like:

```
templates:
  - "templates/postgres.9.3.template.yml"

```

If you remove the `.9.3` from there, you’ll have a much more up-to-date time.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [August 25, 2016, 2:39am UTC](https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177/3 "2016-08-25T02:39:44Z")

</div>

Ah, perfect, thanks!

It was this upgrade:

[https://meta.discourse.org/t/discourse-docker-image-version-1-3-3-released/44778](https://meta.discourse.org/t/discourse-docker-image-version-1-3-3-released/44778)

that brought this on, I think, and it’s because this discourse of mine was set up so long ago.

I’ll post a new topic about cleaning up the mess that change made 😉

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/what-version-of-postgres-should-i-be-using-on-1-6/49177/4 "2024-06-08T12:45:19Z")

</div>

This topic was automatically closed after 2844 days. New replies are no longer allowed.
