Skip to content

Swedish locale is missing #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hwsoderlund opened this issue Nov 10, 2021 · 7 comments
Closed

Swedish locale is missing #17

hwsoderlund opened this issue Nov 10, 2021 · 7 comments

Comments

@hwsoderlund
Copy link

We are using the circle postgres 9.6 image to execute tests against a real database. We have been using the image circleci/postgres:9.6-alpine-ram without issues. Now when I try switching to cimg/postgres:9.6-postgis I get an error message about missing locale:

ERROR:  invalid locale name: "sv_SE.UTF-8"

I tried getting around this by putting locale-gen sv_SE.UTF-8 in the startup command for the postgres image, but to no success. I am unable to get it to generate the locale and start postgres.

docker:
  - image: cimg/go:1.17
  - image: cimg/postgres:9.6-postgis
    command: locale-gen sv_SE.UTF-8
    environment:
        POSTGRES_USER: xxx
        POSTGRES_DB: xxx

I also gave it a go using the postgres 13.4 image, but the locale is missing there too. Is this a mistake, or a deliberate omission?

@FelicianoTech
Copy link
Contributor

I noticed your previous legacy image usage was an Alpine-based image. The next-gen images are Ubuntu only. I wonder if that has something to do with this issue.

Let's find out.

The tags cimg/postgres:13.4 and cimg/postgres:9.6.23 have been updated with all of the config options that the official Debian package uses, including some "locale" changed. Do you mind verifying that your issue is resolved if you can use one of those two images?

If we have to manually start including various locales that are out there, I don't think that's something we'd want to do with this image. I don't think the legacy image did that though so I'm hoping this update ends up working for you.

@hwsoderlund
Copy link
Author

Tried cimg/postgres:9.6.23 and it doesn't even want to start up:

2021-11-16_11-02-22

docker:
  - image: cimg/go:1.17
  - image: cimg/postgres:9.6.23
    environment:
      POSTGRES_USER: xxx
      POSTGRES_DB: xxx

@BytesGuy
Copy link
Contributor

BytesGuy commented Dec 8, 2021

This is possibly related to #21 , can you try the image again to see if it is now working for you? Thanks!

@hwsoderlund
Copy link
Author

Postgres starts up again now. But there is the same locale problem as before.

@hwsoderlund
Copy link
Author

It's now been several months, and still no progress afaict. Please see the linked issue above, from @cexbrayat. Clearly I am not the only one having problems with this. I don't think it is unreasonable for us to expect the new images to be functionally identical to the old ones.

@hwsoderlund
Copy link
Author

Just FYI, I just tried with the official alpine image postgres:9-alpine, where things work as expected. I will stick with that for now.

@FelicianoTech
Copy link
Contributor

Okay. So this issue has been open for awhile now. I got around to doing some research on this. We are not going to solve this issue in the near future and this is why:

  1. This issue itself, CircleCI Ideas, and CircleCI Discuss haven't given us a big indicator that this is a large enough problem right now. The image sets a default of US-en.UTC-8 and this appears to be good enough for the majority of users at the moment.
  2. Multiple source, including the Docker Library PostgreSQL image suggest extending a PostgreSQL Docker image is the right path to add additional locales for this scenario.
  3. Alpine doesn't use locale files the way Debian and Ubuntu (what our image is based on) does. This makes locale work like you're trying to do not run into the same issue. The Docker Library PostgreSQL image that is Debian based will likely have the same issue as ours. If the Alpine version works, that seems to be your best option at the moment unless you'd like to extend our image.

Apologies for the time it took for us to come to a definitive response to this issue.

@FelicianoTech FelicianoTech closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants