In addition to Andreas respond:
1+2) Currently the initDB is used the tmp folder to write other "Helper files" that are deleted afterwards.
The fix is suggested only for win machines ,I think that redirection is more risky (as we saw with this bug) than to do redirect output to a log file that you created and control it ,you gave the permission to and know exactly what its status (even if the reason is that some virus scanner or any other software blocked access to one device or another).
But, I suggest a new improvement:
Check the status and if the command failed than run it without redirection at all, (actually no redirection is needed in this case , you can always run the process in silent mode).
The interesting question that didn't get any answer yet is:
Why EnterpriseDB (which is based on postgress) find it important to change the redirection?
> Date: Tue, 15 Aug 2006 19:10:27 +0200
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED]; email@example.com; [EMAIL PROTECTED]
> Subject: Re: [HACKERS] [PATCHES] [Patch] - Fix for bug #2558, InitDB failed to run
> Tom Lane wrote:
> > Andreas Pflug <[EMAIL PROTECTED]> writes:
> >> what issues might arise if the output is redirected to a legal tmp file?
> > Well, (1) finding a place to put the temp file, ie a writable directory;
> > (2) ensuring the file is removed afterwards; (3) not exposing the user
> > to security hazards due to unsafe use of a temp file (ye olde
> > overwrite-a-symlink risk). Perhaps a few more I didn't think of.
> AFAICS all DEVNULL usages result from redirecting postmaster's output,
> which usually goes to $DATADIR/serverlog at runtime. If this would be
> used here too, (1) is as safe as any $DATADIR, (2) is as safe as
> cleaning up after failure usually is, (3) can't happen because the
> directory is checked to be empty before initdb anyway. Additionally,
> there's might be cases when a meaningful logfile from initdb is
> desirable too. So why no redirection to initlog or so?
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
Be one of the first to try Windows Live Mail. Windows Live Mail.