Re: [PATCHES] [Patch] - Fix for bug #2558, InitDB failed to run
| От | Andreas Pflug |
|---|---|
| Тема | Re: [PATCHES] [Patch] - Fix for bug #2558, InitDB failed to run |
| Дата | |
| Msg-id | 44E20003.4010907@pse-consulting.de обсуждение исходный текст |
| Ответ на | Re: [PATCHES] [Patch] - Fix for bug #2558, InitDB failed to run (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
Tom Lane wrote: > Andreas Pflug <pgadmin@pse-consulting.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
В списке pgsql-hackers по дате отправления: