Page MenuHomePhabricator

Maps-test was created with incorrect initial encoding
Closed, ResolvedPublic


Running psql -l shows that maps-test* postgres DBs were created with SQL_ASCII, whereas all our production servers have it set to UTF8.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Strange thing is that other servers have been reimaged recently and database were created with UTF-8 encoding. There is probably a missing dependency somewhere in Puppet. I'm having a look...

The issue seems to be that when puppet is run manually, the $LANG variable is set, which is used by initdb to guess at the correct encoding. When puppet is run non interactively, which is the case during re-image, encoding falls back to SQL_ASCII. Setting the encoding / locale explicitly should fix that.

Puppet now explicitly sets the locale to use. maps-test cluster has been reimaged with the new puppet code and encoding is now UTF-8.