[Patch] - Fix for bug #2558, InitDB failed to run on windows 2003

From: "dror" <dror_b(at)hotmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: [Patch] - Fix for bug #2558, InitDB failed to run on windows 2003
Date: 2006-08-14 14:45:23
Message-ID: BAY124-W8284D71225D3F7CF90321F94E0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Hi All,


As some of you already noticed and as mentioned in pgsql-hackers before,
the initDB process failed to run on some windows 2003 machines.

Although this issue was already discussed by James Hughes,Martijn,Jim Nasby and others I didn't no patch was created and
no fix was committed to the CVS.

Description:

On some windows 2003 machine there is no access to the nul device for non administrator's users.
The initDB.c redirect the output to > DEVNUL which on windows defined has "nul".

There were two options to solve this issue:

Create a new file , grant a write permission for the Postgres user and redirect the output to that file. (EnterpriseDB use this method)
Canceling the redirection at all.

I choose the second option and omit the redirection in any case that it windows machine and the redirection was sent to DEVNULL.

The only files that I changed are: initDB.c, exec.c and pg_ctl.c


I think postgres must solve this issue, as more and more windows 2003 machine will be discovered with this limitation which prevent from the users to install (actually to initialize ) the DB.

One more comment:
As today we have and MSI installer which redirect the initDB output to a log file by default (and we can also run it in the background) there is no point to use redirection at all.

The fixed files are attached.

Regards
Dror Bar-Gil



_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted

Attachment Content-Type Size
initDb patch.zip application/x-zip-compressed 33.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-08-14 15:19:58 Re: plpgsql and INSERT/UPDATE/DELETE RETURNING
Previous Message Simon Riggs 2006-08-14 14:15:56 Re: Forcing current WAL file to be archived

Browse pgsql-patches by date

  From Date Subject
Next Message Joshua D. Drake 2006-08-14 16:10:37 Re: [PATCHES] Adding fulldisjunctions to the contrib
Previous Message Simon Riggs 2006-08-14 14:15:56 Re: Forcing current WAL file to be archived