Re: initdb crash - Mailing list pgsql-hackers-win32

From Magnus Hagander
Subject Re: initdb crash
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE1716C3@algol.sollentuna.se
Whole thread Raw
In response to initdb crash  (nitrogenycs@web.de)
Responses Re: initdb crash
Re: initdb crash
Re: initdb crash
Re: initdb crash
List pgsql-hackers-win32
>>
>> This is just a guess, but check that the new user (postgres)
>has enough
>> permission on the folders that you are using for Postgresql.
>Since you
>> created the folders as an admin user, ordinary users may not have all
>> the required permissions.
>>
>> System error 5 under windows is a "permission denied" error. I don't
>> know if Postgresql is reflecting that as a signal with the
>same number.
>>
>
>After i read your mail (thank you very much for it) i've set the
>file/folder permission for the c:\postgres folder so that the user
>postgres has full access to it just like every admin has (was
>a bit of a
>hassle cause u have to reboot into safe mode, but i got it).
>Unfortunately
>initdb still crashes in the same way. Then i tried to create
>the postgres
>folder in the home directory of the user which resulted in a
>crash too. Is
>c:\postgres the only folder i have to grant full permissions
>for or are
>there others, too (like some system stuff or sth)? Or is this rather a
>result from the fact that error 5 isn't a permission denied error?

It will require READ permissions on the system directories, as well as
all the subdirs of the install directory (including bin, lib etc).

It *will* say signalled by code 5 when it is actually exiting with
normal exitcode 5.


This is because of the WIFSIGNALED() macro in port.h.

Seems to me these macros are completely wrong for win32. And they are
under a FIXME header - I guess that could be why. Since win32 doesn't
actually detect signals (it has no concept of it in this context),
shouldn't it be something along the line of:

#define WEXITSTATUS(w)  (w & 0x7f)
#define WIFEXITED(w)    (1)
#define WIFSIGNALED(w)  (0)
#define WTERMSIG(w)     (0)


Comments?


//Magnus

pgsql-hackers-win32 by date:

Previous
From: "Gary Doades"
Date:
Subject: Re: initdb crash
Next
From: "Gary Doades"
Date:
Subject: Re: PgSQL not as Administrator - probs on w