Skip to content

Commit

Permalink
initdb parameter modified for pg_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmaetz committed Jul 15, 2024
1 parent e7d7812 commit fa75ae4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions major_upgrade/pg_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ def pg_upgrade(self, check=False):

def prepare_new_pgdata(self, version):
from spilo_commons import append_extensions

locale = self.query('SHOW lc_collate')[0][0]
encoding = self.query('SHOW server_encoding')[0][0]
initdb_config = [{'locale': locale}, {'encoding': encoding}]
locale = self.query("SELECT datcollate FROM pg_database WHERE datname = 'template1'")[0][0]
# encoding = self.query('SHOW server_encoding')[0][0]
initdb_config = [{'locale': locale}, {'locale-provider': 'icu'}]
if self.query("SELECT current_setting('data_checksums')::bool")[0][0]:
initdb_config.append('data-checksums')

Expand Down
1 change: 0 additions & 1 deletion scripts/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ def deep_update(a, b):
--port={{CLONE_PORT}} --user="{{CLONE_USER}}"
{{/CLONE_WITH_BASEBACKUP}}
initdb:
- encoding: UTF8
- locale: {{INITDB_LOCALE}}.UTF-8
- data-checksums
- locale-provider: icu
Expand Down

0 comments on commit fa75ae4

Please sign in to comment.