Re: Failed to run initdb - not resolved bug 5130 - Mailing list pgsql-bugs

From Robert Haas
Subject Re: Failed to run initdb - not resolved bug 5130
Date
Msg-id 603c8f071001040921p7b3b890aye2cbe07c8b559aab@mail.gmail.com
Whole thread Raw
In response to Failed to run initdb - not resolved bug 5130  (Tomas Studva <tstudva@gmail.com>)
Responses Re: Failed to run initdb - not resolved bug 5130  (Tomas Studva <tstudva@gmail.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: "Takesver Kumar Thakur"
Date:
Subject: BUG #5261: Invalide page header
Next
From: Robert Haas
Date:
Subject: Re: BUG #5260: Postgre crashed unexpectedly