We got another report of this failure today:
which I found particularly interesting because it happened on a Fedora
machine, and I had thought Fedora impervious because it considers
glibc-common a standard component. Seems it can happen anyway.
I did some experimentation with the problem by the expedient of
renaming /usr/share/locale and /usr/lib/locale out of the way,
and found that:
1. glibc's setlocale() does in fact fail for setlocale(LC_MESSAGES, "")
if it can't find any locale files, but only if LANG is not C
(I used LANG=en_US to provoke the failure).
2. It fails in the same way for other LC_xxx settings too, but it turns
out that LC_MESSAGES is the only one where we actually pay any attention.
What I propose we do about this is tweak locale_messages_assign() to not
fail if value == "" and source == PGC_S_DEFAULT. Since value == "" is
really a no-op during startup anyway, there is no harm in doing this;
and by restricting it to source == PGC_S_DEFAULT, we can avoid the error
of accepting explicit attempts to set lc_messages to "".
regards, tom lane
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2006-06-02 23:38:57|
|Subject: Re: More thoughts about planner's cost estimates |
|Previous:||From: Rod Taylor||Date: 2006-06-02 23:05:15|
|Subject: Re: More thoughts about planner's cost estimates|