diff --git a/postgres-appliance/major_upgrade/pg_upgrade.py b/postgres-appliance/major_upgrade/pg_upgrade.py index 3a0241bd..ad1563e8 100644 --- a/postgres-appliance/major_upgrade/pg_upgrade.py +++ b/postgres-appliance/major_upgrade/pg_upgrade.py @@ -204,8 +204,9 @@ def pg_upgrade(self, check=False): def prepare_new_pgdata(self, version): from spilo_commons import append_extensions + locale = self.query("SELECT datcollate FROM pg_database WHERE datname='template1';")[0][0] encoding = self.query('SHOW server_encoding')[0][0] - initdb_config = [{'encoding': encoding}] + initdb_config = [{'locale': locale}, {'encoding': encoding}] if self.query("SELECT current_setting('data_checksums')::bool")[0][0]: initdb_config.append('data-checksums')