Skip site navigation (1) Skip section navigation (2)

Failed to run initdb - not resolved bug 5130

From: Tomas Studva <tstudva(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Failed to run initdb - not resolved bug 5130
Date: 2010-01-02 21:51:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
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 -
    bug 5222 -
    bug 4691 -
    ? -
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 

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 ... "));

    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;
    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 

Sincerely Tomas Studva.

Attachment: initdb_full_console.log
Description: text/plain (1.9 KB)


pgsql-bugs by date

Next:From: Tomas StudvaDate: 2010-01-02 21:53:38
Subject: Failed to run initdb - not resolved bug 5130
Previous:From: Tomas StudvaDate: 2010-01-02 21:45:40
Subject: test message

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group