BUG #13409: pg-9.4.3-x86 initdb --locale = C error

From: lincpa(at)163(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13409: pg-9.4.3-x86 initdb --locale = C error
Date: 2015-06-07 02:20:51
Message-ID: 20150607022051.2794.77414@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13409
Logged by: Lin Pengcheng
Email address: lincpa(at)163(dot)com
PostgreSQL version: 9.4.3
Operating system: windows 7 64-bit Simplified Chinese Version
Description:

pg-9.4.3-x86 initdb --locale = C error,
but pg-9.4.3-x64 initdb --locale = C is ok.

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

My env:
windows 7 64-bit Simplified Chinese Version
pgsql-9.4.3-x86

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

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:/pgsql943x86/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:/pgsql943x86/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:/pgsql943x86/data"

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

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=abcd123456

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

Browse pgsql-bugs by date

  From Date Subject
Next Message held911 2015-06-08 06:24:15 BUG #13413: pg_stat_statements don't statistics "DEALLOCATE ALL" statements
Previous Message Michael Paquier 2015-06-06 08:09:03 Re: BUG #13400: Unable to connect postgresql using remote machine