Skip to content

Commit

Permalink
use collate from template1 when initializing after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovinda committed Sep 19, 2024
1 parent 2c84da8 commit 17bb851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion postgres-appliance/major_upgrade/pg_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 17bb851

Please sign in to comment.