Only english locale is installed, missing other languages support in Postgres

Description

Postgresql relies on the OS for numbers and dates comparison and representation.
If a locale is missing the application gets an error for non english locale.

SELECT set_config('lc_time', 'fr_FR.utf8', true) AS time_conf
SQL Error [22023]: ERROR: invalid value for parameter "lc_time": "fr_FR.utf8"
locale -a
C
C.utf8
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE@euro
en_IE.utf8
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SC.utf8
en_SG
en_SG.utf8
en_US
en_US@ampm
en_US.iso885915
en_US.utf8
en_US.utf8@ampm
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
POSIX

Environment

None

AFFECTED CS IDs

CS0041119

Activity

Show:

Slava Sarzhan October 18, 2023 at 3:23 PM

The issue was fixed.

Lalit Choudhary October 18, 2023 at 11:43 AM

Full test example with above docker image fix, 

 

 

 

Creating an image with a fix in Private Docker registry:

 

 

$ ./anydbver deploy k3d private-registry:my-registry.example.com=http://172.17.0.1:5001 k8s-pg:2.2.0

Replace the pg image in cr.yaml with new fixed image, 

 "my-registry.example.com/nokia/percona-postgresql-operator:2.2.0-ppg15-postgres-K8SPG-443"

kubectl apply -f data/k8s/percona-postgresql-operator/deploy/cr.yaml  -n pgo

 

  and now it's working as expected.

 

 

 

 

Nickolay Ihalainen October 18, 2023 at 10:36 AM
Edited

Could be easily fixed with the following Dockerfile:

Done

Details

Assignee

Reporter

Needs QA

Yes

Fix versions

Affects versions

Priority

Smart Checklist

Created October 17, 2023 at 12:41 PM
Updated March 8, 2024 at 4:53 PM
Resolved October 30, 2023 at 3:05 PM