We ran into an interesting error this week, where a job was ending with an encoding error on the completion message.
Our first thought was that the database encoding did not match the value in the metadata, but no, both were set to UTF-8.
This is an Italian customer, and after much head-scratching, we discovered that the configuration value for lc_messages was set to ‘Italian_Italy.1252’. Ajilius expects messages returned by the server to be in the same encoding as the data warehouse.
In this case, the DBMS had been installed with settings from the Italian locale on the server, but the data warehouse database had been created with UTF-8 encoding.
We will now recommend that servers are initialised with initdb using the preferred encoding.
In this case, the customer changed the value of lc_messages in postgresql.conf, and the problem was resolved.