You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the new live server, but not on a test VM oddly, I'm getting this failure:
script[Create the database] action runPG::InvalidParameterValue: ERROR: new encoding (UTF8)
is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "cyclescape_production" ENCODING = 'unicode'
Postgres has the following databases on the live server:
su root
echo "LC_ALL=en_GB.UTF-8" >> /etc/default/locale
# Uninstall any previous installation
service postgresql stop
apt-get -y remove --purge postgresql-9.3 postgresql-9.3-postgis-2.1
rm -rf /var/lib/postgresql/
# Reinstall
apt-get -y install postgresql-9.3 postgresql-9.3-postgis-2.1
# The output of this command will CORRECTLY now include the lines:
# "locale en_GB.UTF-8"
DOESN'T work, resulting in ASCII:
su root
rm -f /etc/default/locale
# Uninstall any previous installation
service postgresql stop
apt-get -y remove --purge postgresql-9.3 postgresql-9.3-postgis-2.1
rm -rf /var/lib/postgresql/
# Reinstall
apt-get -y install postgresql-9.3 postgresql-9.3-postgis-2.1
# The output of this command will show the following:
# "missing default/locale"
# "deleted default/locale"
# "locale C"
This is 100% repeatable - replay the blocks and you'll find it either installs as ASCII or installs as UTF8.
mvl22
changed the title
'Create the database' section failing due to encoding problem
Make resilient to missing /etc/default/locale file - causes Postgres to install as ASCII rather than UTF8
Jan 15, 2015
On the new live server, but not on a test VM oddly, I'm getting this failure:
Postgres has the following databases on the live server:
with the shell command 'locale' giving:
Hmm... on the VM, I get:
with the shell command 'locale' giving:
I wonder if there is some kind of system setting that is wrong on the new server. (If so, we probably need to detect this.)
Potentially useful links:
The text was updated successfully, but these errors were encountered: