Today, I try to update our Discourse instance.
Then, at the beginning, there is no issue, the first update was ok. But there was an second update to reach the last release.
And then, I got a message to run it manually with just 2 commands.
The error message was :
, [2017-01-17T13:44:56.716883 #13] INFO – : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2017-01-17T13:44:56.718442 #13] INFO – : > sleep 5
LOG: skipping missing configuration file “/shared/postgres_data/postgresql.auto.conf”
2017-01-17 13:44:56 UTC [48-2] FATAL: database files are incompatible with server
2017-01-17 13:44:56 UTC [48-3] DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.5.5.
I, [2017-01-17T13:45:01.726832 #13] INFO – :I, [2017-01-17T13:45:01.727202 #13] INFO – : > su postgres -c ‘createdb discourse’ || true
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
After some research on google, I didn’t find similar issue.
Then, I removed the app.yml by renaming it to keep configuration informations and ran the command discourse-setup like a fresh new installation.
I reenter the same informations as specified on the old app.yml file and at the end, the upgrade was OK.
Hope this information will help other people.