Re: BUG #6304: initdb fails with loale ko_KR.eucKR

From: "Balser, Robert W" <robert(dot)balser(at)hp(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6304: initdb fails with loale ko_KR.eucKR
Date: 2011-11-29 16:20:00
Message-ID: 9F2450FE2E24144DAFB4BF513498ADFC1E929FFD@G4W3213.americas.hpqcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki,

Thank you for your detailed analysis and response. I might play with the linker options - right now I am using the default "./configure ; make install" procedure and letting everything happen automatically.

Another thought that I had was to wrap our use of "initdb" with a script that sets the LANG=C beforehand ... since we are using "--no-locale" option anyway it seems maybe unnecessary to honor the user's locale.

Thanks again,

Robert Balser

-----Original Message-----
From: Heikki Linnakangas [mailto:heikki(dot)linnakangas(at)enterprisedb(dot)com]
Sent: Thursday, November 24, 2011 5:08 AM
To: Balser, Robert W
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #6304: initdb fails with loale ko_KR.eucKR

On 24.11.2011 12:23, Heikki Linnakangas wrote:
> On 22.11.2011 23:18, Robert Balser wrote:
>>
>> The following bug has been logged online:
>>
>> Bug reference: 6304
>> Logged by: Robert Balser
>> Email address: robert(dot)balser(at)hp(dot)com
>> PostgreSQL version: 9.0.5
>> Operating system: HPUX 11.31 ia64
>> Description: initdb fails with loale ko_KR.eucKR
>> Details:
>>
>> If you set your LANG=ko_KR.eucKR to set your locale to Korean, the
>> initdb command fails. It works with other locales, e.g. various
>> Japanese, Chinese, and even other Korean locales (e.g. ko_KR.utf8).
>> But ko_KR.eucKR always fails. The command being invoked is:
>>
>> initdb -E UTF8 --no-locale -D<DB_DIR> -U<USER>
>> --pwfile=<PASSWORDFILE>
>>
>> The output of initdb is an "sh:" error (in Korean), followed by a
>> "fgets failure:" (also Korean), and then the following in English:
>>
>> The program "postgres" is needed by initdb but was not found in the
>> same directory as "<PGDIR>/bin/initdb". Check your installation.
>>
>> The postgres binary is of course in that folder, hence working with
>> other locales.

This doesn't look like a Postgres bug, I was able to reproduce this with the attached test program. It seems to depend heavily on the linker options used, this is the minimum set I was able to reduce it to. I think you'll have to pick it up from here with the HP compiler/ operating system guys..

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kasia Tuszynska 2011-11-29 17:57:24 transaction error handling
Previous Message David Schnur 2011-11-29 15:28:33 Re: Repeatable crash in pg_dump (with -d2 info)