BUG #13360: initdb --locale = C error

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

BUG #13360: initdb --locale = C error

От:
lincpa@163.com
Дата:
The following bug has been logged on the website:

Bug reference:      13360
Logged by:          Lin Pengcheng
Email address:      lincpa@163.com
PostgreSQL version: 9.4.2
Operating system:   windows 7
Description:        

pgsql9.4.2 (x86) in win7 (including 32 and 64) for manual installation and
automatically instation, when you run initdb use --locale = C errors occur,
it's indeed a bug.
but I manually install pg9.3 and pg9 .4.0 not have this problem. otherwise
users win8 installed in  pg9.4.2(x64) no problem with --locale = C.

Re: BUG #13360: initdb --locale = C error

От:
Michael Paquier <michael.paquier@gmail.com>
Дата:
On Wed, May 27, 2015 at 10:53 PM,   wrote:
> pgsql9.4.2 (x86) in win7 (including 32 and 64) for manual installation and
> automatically instation, when you run initdb use --locale = C errors occur,
> it's indeed a bug.
> but I manually install pg9.3 and pg9 .4.0 not have this problem. otherwise
> users win8 installed in  pg9.4.2(x64) no problem with --locale = C.

Could you provide more details about the error occurring as well as
how you installed Postgres? I am afraid that I cannot reproduce this
problem with an MSVC installation after initializing with initdb
--locale=C on Win7:
=# show lc_collate;
 lc_collate
------------
 C
(1 row)
=# SELECT version();
                           version
-------------------------------------------------------------
 PostgreSQL 9.4.2, compiled by Visual C++ build 1600, 64-bit
(1 row)

Regards,
-- 
Michael

Re: BUG #13360: initdb --locale = C error

От:
林鹏程 <lincpa@163.com>
Дата:
------------------------------------------

error info:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory D:/pgsql942/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 40
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
creating template1 database in D:/pgsql942/data/base/1 ...
FATAL: XX00: could not adopt C locale
LOCATION: init_locale, src\backend\main\main.c:315
child process exited with exit code 1
initdb: removing contents of data directory "d:/pgsql942/data"

------------------------------------------

my env:
windows 7 simple chinese edit (x86 and x64)
pgsql 9.4.2 x86

------------------------------------------

install batch file 1 by admin:

@ECHO OFF
@setlocal enableextensions
cd /d %~dp0
set PGHOME=%cd%
set PGBIN=%cd%\bin
set PGDATA=%cd%\data
set password=123

net user postgres %password% /add /expires:never /passwordchg:no
netuser postgres /pwnexp:y
rem net localgroup users postgres /delete
ntrights.exe -u postgres +r SeServiceLogonRight

cacls %PGHOME% /E /T /D postgres
cacls %PGHOME% /E /T /G postgres:R
cacls %PGHOME% /E /T /P postgres:R
cacls %PGDATA% /E /T /P postgres:C

pause

------------------------------------------

install batch file 2 by postgres user:

@ECHO OFF
@setlocal enableextensions
chcp 65001

cd /d %~dp0
set PGHOME=%cd%
set PGBIN=%cd%\bin
set PGDATA=%cd%\data

if not exist %PGDATA% md %PGDATA%

%PGBIN%\initdb -D %PGDATA% -E UTF8 --locale=C -W

pause

-----------------------
Regards,
Lin Pengcheng At 2015-05-28 08:44:25, "Michael Paquier" wrote: >On Wed, May 27, 2015 at 10:53 PM, wrote: >> pgsql9.4.2 (x86) in win7 (including 32 and 64) for manual installation and >> automatically instation, when you run initdb use --locale = C errors occur, >> it's indeed a bug. >> but I manually install pg9.3 and pg9 .4.0 not have this problem. otherwise >> users win8 installed in pg9.4.2(x64) no problem with --locale = C. > >Could you provide more details about the error occurring as well as >how you installed Postgres? I am afraid that I cannot reproduce this >problem with an MSVC installation after initializing with initdb >--locale=C on Win7: >=# show lc_collate; > lc_collate >------------ > C >(1 row) >=# SELECT version(); > version >------------------------------------------------------------- > PostgreSQL 9.4.2, compiled by Visual C++ build 1600, 64-bit >(1 row) > >Regards, >-- >Michael
FAQ