I just tried this scenario (de_DE.UTF-8 locally, ssh into machine with
just en_US.UTF-8 available), and apt install postgresql succeeds and
creates a cluster successfully which runs with en_US.UTF-8. But the more
I look at the bug description (which isn't particularly clear) I have
the feeling that we aren't talking about the postgresql package
installation, but instead maas directly calls pg_createcluster? If so,
how exactly does it do that?

The "disregard environment and only look at /etc/default/locale"
workaround is done in postgresql-X.Y's postinst, i. e. it only applies
to package installation time. If you call pg_createcluster directly as
root in a broken environment it won't help you. Now, in theory that
hackish workaround from postinst time could be moved direclty into
pg_createcluster, but I veto that as this is established behaviour and I
don't want to break cases where people call "LANG=xx_YY
pg_createcluster" (see the help of --locale in help output and manpage).

So if in MAAS you also can't rely on the environment, a similar hack
like https://alioth.debian.org/scm/loggerhead/pkg-postgresql/postgresql-
common/trunk/view/head:/debian/maintscripts-functions#L40 might be
required?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1382774

Title:
  Postgresql installation for MAAS fails on locales missing language
  packs

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1382774/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to