Обсуждение: Missing locale files according to psql

Поиск
Список
Период
Сортировка

Missing locale files according to psql

От
John Scalia
Дата:
I've been troubleshooting some connection problems with one of our servers recently, and as part of the effort, I ran
psqlthrough strace in order to see what was going on. Oddly  
enough, I saw a bunch of "problems". The output contained:

open("/usr/pgsql-9.3/share/locale/en_US.UTF-8/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/pgsql-9.3/share/locale/en_US.utf8/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/pgsql-9.3/share/locale/en_US/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/pgsql-9.3/share/locale/en.UTF-8/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/pgsql-9.3/share/locale/en.utf8/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/pgsql-9.3/share/locale/en/LC_MESSAGES/pgsql-9.3.mo", O_RDONLY) = -1 ENOENT (No such file or directory)

I looked in /usr/pgsql-9.3/share/locale and only saw "cs    de es       fr    it    ja    pl     pt_BR        ro    ru
 sv tr    zh_CN    zh_TW" 
but nothing looking like en* anything. Now, my connection problem is only with one server, and psql works to other 2
servers,but what should I have in the locale directory? After  
the above error block, it appears that psql gives up and just continues initializing. I don't see any more attempts to
loadan locale files. If it makes a difference, this is  
postgreSQL 9.3.3 on CentOS 6.5 loaded via yum installs.
--
Jay


Re: Missing locale files according to psql

От
Peter Eisentraut
Дата:
On 9/19/14 2:58 PM, John Scalia wrote:
> I've been troubleshooting some connection problems with one of our
> servers recently, and as part of the effort, I ran psql through strace
> in order to see what was going on. Oddly enough, I saw a bunch of
> "problems". The output contained:
>
> open("/usr/pgsql-9.3/share/locale/en_US.UTF-8/LC_MESSAGES/pgsql-9.3.mo",
> O_RDONLY) = -1 ENOENT (No such file or directory)

This is not a problem.  It's looking for message translation files for
en_US, but if they are not there, it will proceed without them.


Re: Missing locale files according to psql

От
jayknowsunix@gmail.com
Дата:
Ok, enough, but if they're not included in the PostgreSQL rpm, why does psql look for them?

Sent from my iPad

> On Sep 22, 2014, at 2:06 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
>
>> On 9/19/14 2:58 PM, John Scalia wrote:
>> I've been troubleshooting some connection problems with one of our
>> servers recently, and as part of the effort, I ran psql through strace
>> in order to see what was going on. Oddly enough, I saw a bunch of
>> "problems". The output contained:
>>
>> open("/usr/pgsql-9.3/share/locale/en_US.UTF-8/LC_MESSAGES/pgsql-9.3.mo",
>> O_RDONLY) = -1 ENOENT (No such file or directory)
>
> This is not a problem.  It's looking for message translation files for
> en_US, but if they are not there, it will proceed without them.


Re: Missing locale files according to psql

От
Peter Eisentraut
Дата:
On 9/22/14 2:08 PM, jayknowsunix@gmail.com wrote:
> Ok, enough, but if they're not included in the PostgreSQL rpm, why does psql look for them?

This is how locales work, independent of PostgreSQL or psql.  You set a
locale in the environment, the operating system looks if locale
information files are installed, and if not in proceeds with a fallback.



Re: Missing locale files according to psql

От
Tom Lane
Дата:
Peter Eisentraut <peter_e@gmx.net> writes:
> On 9/22/14 2:08 PM, jayknowsunix@gmail.com wrote:
>> Ok, enough, but if they're not included in the PostgreSQL rpm, why does psql look for them?

> This is how locales work, independent of PostgreSQL or psql.  You set a
> locale in the environment, the operating system looks if locale
> information files are installed, and if not in proceeds with a fallback.

Perhaps more to the point: there is a defined search path that libc is
supposed to follow when looking to see if there is a messages file for
the application.  It does not know in advance whether the app has a
messages file or exactly where in the path it'll be located.

            regards, tom lane