~xenrox/ansible

6ef472de0f1ea9fdfa9033959b6a3da1cb96bd93 — Thorben Günther 8 months ago fe7341c
postgres: Switch to C.UTF-8

This locale is included in glibc.
Another advantage is, that this will prevent future warnings about
a collation version mismatch on glibc upgrades.
2 files changed, 5 insertions(+), 5 deletions(-)

M roles/postgres/tasks/main.yml
M roles/postgres/templates/postgresql.conf.j2
M roles/postgres/tasks/main.yml => roles/postgres/tasks/main.yml +1 -1
@@ 22,7 22,7 @@
  become: true
  become_user: postgres
  ansible.builtin.command:
    cmd: initdb --locale en_US.UTF-8 -E UTF-8 -D '/var/lib/postgres/data'
    cmd: initdb --locale C.UTF-8 -E UTF-8 -D '/var/lib/postgres/data'
    chdir: /var/lib/postgres
    creates: /var/lib/postgres/data/postgresql.conf


M roles/postgres/templates/postgresql.conf.j2 => roles/postgres/templates/postgresql.conf.j2 +4 -4
@@ 707,11 707,11 @@ timezone = 'UTC'
					# encoding

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'en_US.UTF-8'			# locale for system error message
lc_messages = 'C.UTF-8'			# locale for system error message
					# strings
lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
lc_numeric = 'en_US.UTF-8'			# locale for number formatting
lc_time = 'en_US.UTF-8'				# locale for time formatting
lc_monetary = 'C.UTF-8'			# locale for monetary formatting
lc_numeric = 'C.UTF-8'			# locale for number formatting
lc_time = 'C.UTF-8'				# locale for time formatting

# default configuration for text search
default_text_search_config = 'pg_catalog.english'