1

I'm running Postgres 9.6.1 on a Debian-based Docker image. My default locale is en_US.utf8. I'm trying to create a collation of type ja_JP.utf8. I have the Japanese locale installed as demonstrated by the command locale -a:

$ locale -a
C
C.UTF-8
en_US.utf8
ja_JP.utf8
POSIX

However, when trying to create the Japanese collation in psql, I get the following, nonsensical error message:

# create collation ja_JP (LOCALE="ja_JP.utf8");
ERROR: could not create locale "ja_JP.utf8": Success

Googling a bit finds me a bug report from over two years back: https://www.postgresql.org/message-id/20140525154511.GA21233%40alap3.anarazel.de

It looks the same, and judging from my symptoms, it isn't fixed yet! Is there any way to work around this bug?

asked Dec 10, 2016 at 20:07

1 Answer 1

1

I found a workaround: the bug happens only if an earlier attempt to create a collation has failed. After a failure, the bug seems to keep happening until the server process is restarted. So to create the collation, you have to get it right from the start, or restart the process to try again. To restart a Docker container, use

docker restart $DB_CONTAINER_NAME_HERE
answered Dec 10, 2016 at 20:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.