Обсуждение: initdb failure on Windows XP

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

initdb failure on Windows XP

От
Sachin Srivastava
Дата:
I am using PostgreSQL 8.3 on Windows XP SP2.

I am getting this strange error while initdb:

Part of the error message i get,

The database cluster will be initialized with locale English_United
States.1252.

The default database encoding has accordingly been set to WIN1252.
The default text search configuration will be set to "english".

fixing permissions on existing directory C:/postgres/data ... ok
creating subdirectories ... initdb: could not create directory
"C:/postgres": File exists
initdb: removing contents of data directory "C:/postgres/data"


Looking into the initdb code, it should create sub directories (global,
pg_xlog, pg_clog, base etc ) under directory C:/postgres/data. I cannot
understand, why it is trying to create "C:/postgres".

Any thoughts?

--
Regards,
Sachin Srivastava
www.enterprisedb.com


Re: initdb failure on Windows XP

От
"Joshua D. Drake"
Дата:
On Fri, 2009-07-17 at 23:42 +0530, Sachin Srivastava wrote:
> I am using PostgreSQL 8.3 on Windows XP SP2.
>
> I am getting this strange error while initdb:
>
> Part of the error message i get,
>
> The database cluster will be initialized with locale English_United
> States.1252.
>
> The default database encoding has accordingly been set to WIN1252.
> The default text search configuration will be set to "english".
>
> fixing permissions on existing directory C:/postgres/data ... ok
> creating subdirectories ... initdb: could not create directory
> "C:/postgres": File exists
> initdb: removing contents of data directory "C:/postgres/data"
>
>
> Looking into the initdb code, it should create sub directories (global,
> pg_xlog, pg_clog, base etc ) under directory C:/postgres/data. I cannot
> understand, why it is trying to create "C:/postgres".
>
> Any thoughts?

Well the error I see is that C:/postgres already exists. Meaning you had
a postgres file or directory already. Initdb will bail out if that is
the case.

Joshua D. Drake

--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


Re: initdb failure on Windows XP

От
Sachin Srivastava
Дата:
On 07/18/2009 12:03 AM, Joshua D. Drake wrote:
On Fri, 2009-07-17 at 23:42 +0530, Sachin Srivastava wrote: 
I am using PostgreSQL 8.3 on Windows XP SP2.

I am getting this strange error while initdb:

Part of the error message i get,

The database cluster will be initialized with locale English_United 
States.1252.

The default database encoding has accordingly been set to WIN1252.
The default text search configuration will be set to "english".

fixing permissions on existing directory C:/postgres/data ... ok
creating subdirectories ... initdb: could not create directory 
"C:/postgres": File exists
initdb: removing contents of data directory "C:/postgres/data"


Looking into the initdb code, it should create sub directories (global, 
pg_xlog, pg_clog, base etc ) under directory C:/postgres/data. I cannot 
understand, why it is trying to create "C:/postgres".

Any thoughts?   
Well the error I see is that C:/postgres already exists. Meaning you had
a postgres file or directory already. Initdb will bail out if that is
the case. 
I have a directory structure as :
C:\
       ->Postgres
                  -->bin
                  -->lib
                  -->share
Now i get this error, when i tried to do initdb setting my PGDATA to C:\postgres\data which is an empty directory and i am running it (initdb)  as administrator user.


 
Joshua D. Drake
 


-- 
Regards,
Sachin Srivastava
www.enterprisedb.com

Re: initdb failure on Windows XP

От
Serge Fonville
Дата:
> I am using PostgreSQL 8.3 on Windows XP SP2.
>
> I am getting this strange error while initdb:
>
> Part of the error message i get,
>
> The database cluster will be initialized with locale English_United
> States.1252.
>
> The default database encoding has accordingly been set to WIN1252.
> The default text search configuration will be set to "english".
>
> fixing permissions on existing directory C:/postgres/data ... ok
> creating subdirectories ... initdb: could not create directory
> "C:/postgres": File exists
> initdb: removing contents of data directory "C:/postgres/data"
>
> I have a directory structure as :
> C:\
>        ->Postgres
>                   -->bin
>                   -->lib
>                   -->share
> Now i get this error, when i tried to do initdb setting my PGDATA to
> C:\postgres\data which is an empty directory and i am running it (initdb)
> as administrator user.

Could you post the exact steps, settings and output?
That makes it a lot easier to determine the exact issue.
Also, have you checked the event log?

Regards,

Serge Fonville