Thread: Failed to run initdb - not resolved bug 5130

Failed to run initdb - not resolved bug 5130

From
Tomas Studva
Date:
Hi all gurus,

I've encountered on my computer this bug. I will try to describe all what I
have discovered till now.

1, this bug happened a few times before and wasn't resolved:
    bug 5130 -
http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg24810.html
    bug 5222 -
http://archives.postgresql.org/pgsql-bugs/2009-12/msg00004.php
    bug 4691 -
http://archives.postgresql.org/pgsql-bugs/2009-03/msg00028.php
    ? - http://forums.enterprisedb.com/posts/list/1845.page
I think the problem was always the same.

My case is WIN XP SP 2 and also when applied SP3. My system has only one
speciality as I know, that is I have windows installed on F partition.

Problem description:

I tried install with one click installer, it ends with error
postgresql.conf not found. In log it is failing on initdb, which clears
data dir after failure. Uninstaller is not working, do nothing when
runned. When run installation again, then upgrade mode is run, because
installation is found. This can be tricked by deleting installation from
registry and deleting win service, then new install is possible.

I was installing on path F:\Program Files\PostgreSQL\8.4 and also tried
C:\Program Files\PostgreSQL\8.4, problem is probably not with install
path.

OK, what more I have tried. MS Visuall C++ redistr. I uninstalled, so
the one with postgres comming were installed surely. I tried to enable
debug output, but it gives no new information. I was reading initdb sources
and problem is probably in this part, because I see message
"selecting default max_connections " then one error message. It
looks for me as snprintf is not executed or reached or etc.

-----------------------------------------------------------------------------
    printf(_("selecting default max_connections ... "));
    fflush(stdout);

    for (i = 0; i < connslen; i++)
    {
        test_conns = trial_conns[i];
        test_buffs = MIN_BUFS_FOR_CONNS(test_conns);

        snprintf(cmd, sizeof(cmd),
                 SYSTEMQUOTE "\"%s\" --boot -x0 %s "
                 "-c max_connections=%d "
                 "-c shared_buffers=%d "
                 "< \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
                 backend_exec, boot_options,
                 test_conns, test_buffs,
                 DEVNULL, DEVNULL);
        status = system(cmd);
        if (status == 0)
        {
            ok_buffers = test_buffs;
            break;
        }
    }
    if (i >= connslen)
        i = connslen - 1;
    n_connections = trial_conns[i];

    printf("%d\n", n_connections);
-----------------------------------------------------------------------------

Now I am out of ideas, I can try to install some older version of
postgres, but i had some problems also with that (but it is not
important for this). I want to install this new version. Can u help me
please?

Sincerely Tomas Studva.



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

The database cluster will be initialized with locale Slovak_Slovakia.1250.
The default database encoding has accordingly been set to WIN1250.
initdb: could not find suitable text search configuration for locale Slovak_Slov
akia.1250
The default text search configuration will be set to "simple".

fixing permissions on existing directory f:/Program Files/PostgreSQL/8.4/data ..
. ok
creating subdirectories ... ok
selecting default max_connections ... The system cannot find the file specified.

The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
10
selecting default shared_buffers ... The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
400kB
creating configuration files ... ok
creating template1 database in f:/Program Files/PostgreSQL/8.4/data/base/1 ... o
k
initializing pg_authid ... The system cannot find the file specified.
child process exited with exit code 1
initdb: removing contents of data directory "f:/Program Files/PostgreSQL/8.4/dat
a"

Re: Failed to run initdb - not resolved bug 5130

From
John R Pierce
Date:
Tomas Studva wrote:
> My case is WIN XP SP 2 and also when applied SP3. My system has only
> one speciality as I know, that is I have windows installed on F
> partition.
> ....
> I was installing on path F:\Program Files\PostgreSQL\8.4 and also
> tried C:\Program Files\PostgreSQL\8.4, problem is probably not with
> install path.

try a path without a space in it.   I put mine on D:\Postgresql_84\

Re: Failed to run initdb - not resolved bug 5130

From
Tomas Studva
Date:
It is not working also for dir "F:Programs\PostgreSQL".

Tomas


John R Pierce wrote:
>
> Tomas Studva wrote:
>> My case is WIN XP SP 2 and also when applied SP3. My system has only
>> one speciality as I know, that is I have windows installed on F
>> partition.
>> ....
>> I was installing on path F:\Program Files\PostgreSQL\8.4 and also
>> tried C:\Program Files\PostgreSQL\8.4, problem is probably not with
>> install path.
>
> try a path without a space in it.   I put mine on D:\Postgresql_84\
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>
>

--
View this message in context:
http://old.nabble.com/Failed-to-run-initdb---not-resolved-bug-5130-tp26996830p26997575.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

Re: Failed to run initdb - not resolved bug 5130

From
Craig Ringer
Date:
John R Pierce wrote:
> Tomas Studva wrote:
>> My case is WIN XP SP 2 and also when applied SP3. My system has only
>> one speciality as I know, that is I have windows installed on F
>> partition.
>> ....
>> I was installing on path F:\Program Files\PostgreSQL\8.4 and also
>> tried C:\Program Files\PostgreSQL\8.4, problem is probably not with
>> install path.
>
> try a path without a space in it.   I put mine on D:\Postgresql_84\

That _really_ shouldn't make a difference - and if it does, it's a bug.

I've had no issues with spaces in paths here.

--
Craig Ringer

Re: Failed to run initdb - not resolved bug 5130

From
Robert Haas
Date:
2010/1/2 Tomas Studva <tstudva@gmail.com>:
> Hi all gurus,
>
> I've encountered on my computer this bug. I will try to describe all what=
 I
> have discovered till now.
>
> 1, this bug happened a few times before and wasn't resolved:
> =A0 bug 5130 -
> http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg24810.html
> =A0 bug 5222 - http://archives.postgresql.org/pgsql-bugs/2009-12/msg00004=
.php
> =A0 bug 4691 - http://archives.postgresql.org/pgsql-bugs/2009-03/msg00028=
.php
> =A0 ? - http://forums.enterprisedb.com/posts/list/1845.page
> I think the problem was always the same.
>
> My case is WIN XP SP 2 and also when applied SP3. My system has only one
> speciality as I know, that is I have windows installed on F partition.
>
> Problem description:
>
> I tried install with one click installer, it ends with error postgresql.c=
onf
> not found. In log it is failing on initdb, which clears data dir after
> failure. Uninstaller is not working, do nothing when runned. When run
> installation again, then upgrade mode is run, because installation is fou=
nd.
> This can be tricked by deleting installation from registry and deleting w=
in
> service, then new install is possible.
>
> I was installing on path F:\Program Files\PostgreSQL\8.4 and also tried
> C:\Program Files\PostgreSQL\8.4, problem is probably not with install pat=
h.
>
> OK, what more I have tried. MS Visuall C++ redistr. I uninstalled, so the
> one with postgres comming were installed surely. I tried to enable debug
> output, but it gives no new information. I was reading initdb sources and
> problem is probably in this part, because I see message "selecting default
> max_connections " then one error message. It looks for me as snprintf is =
not
> executed or reached or etc.
>
> -------------------------------------------------------------------------=
----
> =A0 printf(_("selecting default max_connections ... "));
> =A0 fflush(stdout);
>
> =A0 for (i =3D 0; i < connslen; i++)
> =A0 {
> =A0 =A0 =A0 test_conns =3D trial_conns[i];
> =A0 =A0 =A0 test_buffs =3D MIN_BUFS_FOR_CONNS(test_conns);
>
> =A0 =A0 =A0 snprintf(cmd, sizeof(cmd),
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0SYSTEMQUOTE "\"%s\" --boot -x0 %s "
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"-c max_connections=3D%d "
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"-c shared_buffers=3D%d "
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"< \"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0backend_exec, boot_options,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0test_conns, test_buffs,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DEVNULL, DEVNULL);

Are you able to compile from source?  If so, can you hack this part to
print the value of cmd at this point, so you can see clearly exactly
what it's trying unsuccessfully to do?

...Robert

Re: Failed to run initdb - not resolved bug 5130

From
Tomas Studva
Date:
Hi,
I have some time now. I've tried to compile postgres from CVS but wihout
success. I don't have visual studio 2005 installed so I've tried eclipse +
MinGw. I checked out postgres from cvs branch "REL8_4_STABLE". But I wasn't
able to compile it. I don't know how to configure builders to launch
makefiles or what to do.

Any help will be apprecciated and write in-depth receipe, I am not a C/C++
developer (I am Java oriented).

Tomas


Robert Haas wrote:
>=20
> 2010/1/2 Tomas Studva <tstudva@gmail.com>:
>> Hi all gurus,
>>
>> I've encountered on my computer this bug. I will try to describe all what
>> I
>> have discovered till now.
>>
>> 1, this bug happened a few times before and wasn't resolved:
>> =C2=A0 bug 5130 -
>> http://www.mail-archive.com/pgsql-bugs@postgresql.org/msg24810.html
>> =C2=A0 bug 5222 -
>> http://archives.postgresql.org/pgsql-bugs/2009-12/msg00004.php
>> =C2=A0 bug 4691 -
>> http://archives.postgresql.org/pgsql-bugs/2009-03/msg00028.php
>> =C2=A0 ? - http://forums.enterprisedb.com/posts/list/1845.page
>> I think the problem was always the same.
>>
>> My case is WIN XP SP 2 and also when applied SP3. My system has only one
>> speciality as I know, that is I have windows installed on F partition.
>>
>> Problem description:
>>
>> I tried install with one click installer, it ends with error
>> postgresql.conf
>> not found. In log it is failing on initdb, which clears data dir after
>> failure. Uninstaller is not working, do nothing when runned. When run
>> installation again, then upgrade mode is run, because installation is
>> found.
>> This can be tricked by deleting installation from registry and deleting
>> win
>> service, then new install is possible.
>>
>> I was installing on path F:\Program Files\PostgreSQL\8.4 and also tried
>> C:\Program Files\PostgreSQL\8.4, problem is probably not with install
>> path.
>>
>> OK, what more I have tried. MS Visuall C++ redistr. I uninstalled, so the
>> one with postgres comming were installed surely. I tried to enable debug
>> output, but it gives no new information. I was reading initdb sources and
>> problem is probably in this part, because I see message "selecting
>> default
>> max_connections " then one error message. It looks for me as snprintf is
>> not
>> executed or reached or etc.
>>
>> ------------------------------------------------------------------------=
-----
>> =C2=A0 printf(_("selecting default max_connections ... "));
>> =C2=A0 fflush(stdout);
>>
>> =C2=A0 for (i =3D 0; i < connslen; i++)
>> =C2=A0 {
>> =C2=A0 =C2=A0 =C2=A0 test_conns =3D trial_conns[i];
>> =C2=A0 =C2=A0 =C2=A0 test_buffs =3D MIN_BUFS_FOR_CONNS(test_conns);
>>
>> =C2=A0 =C2=A0 =C2=A0 snprintf(cmd, sizeof(cmd),
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SYSTEMQUOTE "\"%s=
\" --boot -x0 %s "
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"-c max_connectio=
ns=3D%d "
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"-c shared_buffer=
s=3D%d "
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"< \"%s\" > \"%s\=
" 2>&1" SYSTEMQUOTE,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0backend_exec, boo=
t_options,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0test_conns, test_=
buffs,
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DEVNULL, DEVNULL);
>=20
> Are you able to compile from source?  If so, can you hack this part to
> print the value of cmd at this point, so you can see clearly exactly
> what it's trying unsuccessfully to do?
>=20
> ...Robert
>=20
> --=20
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>=20
>=20

--=20
View this message in context: http://old.nabble.com/Failed-to-run-initdb---=
not-resolved-bug-5130-tp26996830p27330525.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

Re: Failed to run initdb - not resolved bug 5130

From
Euler Taveira de Oliveira
Date:
Tomas Studva escreveu:
> I have some time now. I've tried to compile postgres from CVS but wihout
> success. I don't have visual studio 2005 installed so I've tried eclipse +
> MinGw. I checked out postgres from cvs branch "REL8_4_STABLE". But I wasn't
> able to compile it. I don't know how to configure builders to launch
> makefiles or what to do.
>
Take a look at [1][2].


[1] http://wiki.postgresql.org/wiki/Working_with_Eclipse
[2] http://www.postgresql.org/docs/faqs.FAQ_MINGW.html


--
  Euler Taveira de Oliveira
  http://www.timbira.com/