Re: initdb.exe changes --locale option

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
Cc: Mike Toews <mwtoews(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: initdb.exe changes --locale option
Date: 2012-09-14 10:58:30
Message-ID: CA+OCxowCts5FW+XLTfrEm1PXL11VtcCPBOTShkh0tc-WrG90mQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I note also that two of the special case locales Mike found are ones
that are supposed to be handled properly by that patch (they have dots
in the name). Here's an earlier attempt, which I believe the second
patch was intended to complement:

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d5a7bf8c11c8b66c822bbb1a6c90e1a14425bd6e

On Fri, Sep 14, 2012 at 6:54 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> On Fri, Sep 14, 2012 at 6:14 AM, Sandeep Thakkar
> <sandeep(dot)thakkar(at)enterprisedb(dot)com> wrote:
>> No.. what I mean to say is that the output from getlocales is same in 9.1
>> and 9.2. (I checked the installation logs). It's initdb in 9.2 that is not
>> accepting the same output. So, it has nothing to with the VC++ runtimes.
>
> Ah, OK. Sorry - misunderstood what you were saying. I guess it could
> still be the runtimes, but affecting initdb, though a quick look at
> the initdb commit logs shows this
> http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a88b6e4cfbff9802906dd400ef334ffa49e7f286,
> which I'd immediately suspect as at least part of the culprit, except
> that it was apparently backported to 9.1.
>
>> PG9.1:
>> --
>> c:\Program Files\PostgreSQL\9.1>bin\initdb.exe" --locale="English, New
>> Zealand" -D "c:\Program Files\PostgreSQL\9.1\data2"
>>
>> The files belonging to this database system will be owned by user "edb".
>> This user must also own the server process.
>>
>> The database cluster will be initialized with locale English, New Zealand.
>> <-- OKAY
>> --
>>
>> PG9.2:
>> --
>> c:\Program Files\PostgreSQL\9.2>bin\initdb.exe --locale="English, New
>> Zealand" -D "c:\Program Files\PostgreSQL\9.2\data2"
>>
>> The files belonging to this database system will be owned by user "edb".
>> This user must also own the server process.
>>
>> The database cluster will be initialized with locale "English_United
>> States.1252 <--NOT OKAY
>> --
>>
>> Now, on 9.2, if we replace "," with "_" from the locale name, then it works
>> fine:
>> c:\Program Files\PostgreSQL\9.2>bin\initdb.exe" --locale="English_New
>> Zealand" -D "c:\Program Files\PostgreSQL\data"
>>
>> The files belonging to this database system will be owned by user "edb".
>> This user must also own the server process.
>>
>> The database cluster will be initialized with locale "English_New
>> Zealand.1252". <-- OKAY
>> --
>>
>> So, actually it's initdb that has undergone change. Fix in initdbcluster.vbs
>> so that the locale name is passed with "_" to initdb.exe, is just a
>> workaround from installer.
>>
>>
>> On Fri, Sep 14, 2012 at 3:11 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>
>>>
>>>
>>> On Friday, September 14, 2012, Sandeep Thakkar wrote:
>>>>
>>>> I think everything is covered by Mike here. "getlocales.exe" returns the
>>>> list of locales in the format "Language, Country" for most of them. and this
>>>> worked fine on 9.1, but does not work on 9.2. And if we are looking for a
>>>> workaround in installer, then as Mike suggested, we should handle it in
>>>> initcluster.vbs. (for 9.2.0)
>>>
>>>
>>> Hmm, thanks Sandeep. So I believe the only thing that changed in this area
>>> between 9.1 and 9.2 is that we moved from VC++ 2008 to 2010. Can you confirm
>>> that's the only difference please, and that the output from getlocales does
>>> differ between versions when run on the same box?
>>>
>>> If that's the case, we can do the tweaking of the names there, but only
>>> when using the newer compiler, if we cannot find a better fix.
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>> Senior Software Engineer
>> EnterpriseDB Corporation
>> The Enterprise Postgres Company
>> Phone: +91.20.30589514
>>
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>> This e-mail message (and any attachment) is intended for the use of the
>> individual or entity to whom it is addressed. This message contains
>> information from EnterpriseDB Corporation that may be privileged,
>> confidential, or exempt from disclosure under applicable law. If you are not
>> the intended recipient or authorized to receive this for the intended
>> recipient, any use, dissemination, distribution, retention, archiving, or
>> copying of this communication is strictly prohibited. If you have received
>> this e-mail in error, please notify the sender immediately by reply e-mail
>> and delete this message.
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit kapila 2012-09-14 13:01:37 Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown
Previous Message Dave Page 2012-09-14 10:54:46 Re: initdb.exe changes --locale option