Re: windows / initdb oddness

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>, 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 02:29:59
Message-ID: 43FBCCA7.9060104@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:

> I wrote:
>
>>
>> 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.

cheers

andrew

Attachment Content-Type Size
initdb.patch text/x-patch 2.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-02-22 03:24:28 initdb -U wrongness
Previous Message Mark Kirkwood 2006-02-22 01:53:03 Re: pg_config, pg_service.conf, postgresql.conf ....

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2006-02-22 07:23:00 Re: windows / initdb oddness
Previous Message Andrew Dunstan 2006-02-21 23:05:48 Re: windows / initdb oddness