# Errors were encountered while processing: postgresql-contrib-9.5

**URL:** <https://meta.discourse.org/t/errors-were-encountered-while-processing-postgresql-contrib-9-5/52670>\
**Category:** Self-hosting\
**Created:** [08.Ноябрь.2016 16:53:54 UTC](https://meta.discourse.org/t/errors-were-encountered-while-processing-postgresql-contrib-9-5/52670 "2016-11-08T16:53:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)\
**Post date:** [08.Ноябрь.2016 17:05:32 UTC](https://meta.discourse.org/t/errors-were-encountered-while-processing-postgresql-contrib-9-5/52670/3 "2016-11-08T17:05:32Z")

</div>

I choose the 9.3 because there was some bug with the LANG value.  
Now if I’m using `templates/postgres.template.yml`, I get the following message in logs:

```
Failure, exiting
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES FAILED

You are going to need to export your data and import into a clean instance:

In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml"

Run ./launcher rebuild app again

When your instance is running:
Run ./launcher enter app
Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db

Undo the postgres template in your container config
Run: ./launcher stop app
Run: sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old
Run: ./launcher rebuild app

Run: ./launcher enter app
Run: cd /shared/postgres_backup
Run: sv stop unicorn
Run: sudo -iu postgres dropdb discourse
Run: sudo -iu postgres createdb discourse
Run: sudo -iu postgres psql discourse < backup.db
Run: exit
Run: ./launcher rebuild app

FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 39 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "/root/upgrade_postgres"
ebd56652d59e7b6edf01ea0d356cf73719b37fc918a87d6f6db292bf18e6aa68
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

But, because `rebuild` is failing with the template `postgres.9.3.template.yml`, I don’t know what to do…

---

_[View the full topic](https://meta.discourse.org/t/errors-were-encountered-while-processing-postgresql-contrib-9-5/52670)._
