# שגיאת עדכון של Postgresql עם אזור זמן בבנייה מחדש

**URL:** <https://meta.discourse.org/t/postgresql-upgrade-error-with-locale-on-rebuild/87621>\
**Category:** Self-hosting\
**Created:** [16 במאי,‏ 2018,‏ 10:52am UTC](https://meta.discourse.org/t/postgresql-upgrade-error-with-locale-on-rebuild/87621 "2018-05-16T10:52:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![\_vincent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/_vincent/32/119557_2.png) [@\_vincent](https://meta.discourse.org/u/_vincent)\
**Post date:** [16 במאי,‏ 2018,‏ 10:52am UTC](https://meta.discourse.org/t/postgresql-upgrade-error-with-locale-on-rebuild/87621/1 "2018-05-16T10:52:40Z")

</div>

Hi,

I’m currently trying to rebuild my container, which desperately fails:

```
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "fr_FR.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

```

The first time, I got this message:

```
les valeurs de lc_collate de la base de données « postgres » ne correspondent pas : ancien « en_US.UTF-8 », nouveau « fr_FR.UTF-8 »

Échec, sortie

-------------------------------------------------------------------------------------

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.5.template.yml"

Run ./launcher rebuild app again

When your instance is running:

Run ./launcher enter app

Run apt-get remove postgresql-client-9.5

Run cd /shared/postgres_backup &amp;&amp; sudo -u postgres pg_dump discourse &gt; backup.db

Undo the base_image 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 &lt; backup.db

Run: exit

Run: ./launcher rebuild app

```

I’m trying to follow the instructions but it keeps failing, apparently due to the previous locale error.  
I did locale-gen the correct locales.

Help anyone?

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/postgresql-upgrade-error-with-locale-on-rebuild/87621)._
