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

Re: windows / initdb oddness

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: windows / initdb oddness
Date: 2006-02-22 07:23:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
> >> I will add some trace writes when I get a chance. I was 
> rather hoping 
> >> something would jump out at you, but obviously it hasn't, so I'll 
> >> have to dig into it the slow way. *sigh*
> >
> >
> >
> > Just eyeballing the code it looks to me like the problem is 
> this line:
> >
> >        strcat(cmdline, *" --restrictedexec"*);
> >
> >
> > which is appending an option type argument after the 
> non-option argument.
> >
> >
> > That would exactly account for the failure when we call 
> "initdb foo" 
> > but not "initdb -D foo".
> >
> > The solution would be put --restrictedexec earlier on the 
> new command 
> > line. I'll work on that.
> The probem is apparently the one I identified above, and is 
> fixed by the attached patch, which I will apply soon unless 
> there are objections.
> As for why we saw this on loris but not snake, I suspect they 
> might have different getopt libraries installed.

Isn't that just fixing the symptom and not the actual bug? In this case,
if we cause the bug, we should do this as well, but doesn't it crash the
same way if you *manually* put arguments in the "wrong order" on the
commandline? Like "inidb foo --no-locale" or somehting like that?

(I still can't reproduce it on my machines, so I guess I have a better
getopt as well.)



pgsql-hackers by date

Next:From: Lukas SmithDate: 2006-02-22 07:47:19
Subject: Re: PostgreSQL unit tests
Previous:From: Michael GlaesemannDate: 2006-02-22 06:27:02
Subject: PostgreSQL unit tests

pgsql-patches by date

Next:From: David FetterDate: 2006-02-22 07:31:14
Subject: Re: Uninstall scripts for contrib
Previous:From: Andrew DunstanDate: 2006-02-22 02:29:59
Subject: Re: windows / initdb oddness

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