| From: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Subject: | Re: [PATCHES] [Patch] - Fix for bug #2558, InitDB failed to run |
| Date: | 2006-08-15 17:10:27 |
| Message-ID: | 44E20003.4010907@pse-consulting.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Andreas Pflug <pgadmin(at)pse-consulting(dot)de> 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?
Regards,
Andreas
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-08-15 17:13:33 | Re: [HACKERS] Forcing current WAL file to be archived |
| Previous Message | Matthew T. O'Connor | 2006-08-15 17:07:44 | Re: New beginings |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-08-15 17:13:33 | Re: [HACKERS] Forcing current WAL file to be archived |
| Previous Message | Simon Riggs | 2006-08-15 17:07:12 | Re: Forcing current WAL file to be archived |