Re: [HACKERS] More initdb follies
От | Oliver Elphick |
---|---|
Тема | Re: [HACKERS] More initdb follies |
Дата | |
Msg-id | 199912091114.LAA09862@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | More initdb follies (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: [HACKERS] More initdb follies
|
Список | pgsql-hackers |
Peter Eisentraut wrote: >In my digging around in initdb, I came to the --username option, which >supposedly allows you toinitialize the database system with another >username. Not a bad idea, really. > >Obviously, you'd have to be root in thatcase, because you want to create >files in someone else's name. But if you are root, the backends will >refuse to execute,wisely so. So this option is totally broken. > >I propose that I remove it, and that it instead be possible thatyou can >do > >root# su -l postgres -c 'initdb ...' You can already do this; this example is from the Debian package installation (which runs as root, of course): su postgres -c "cd ${PGHOME}; . ./${PROFILE}; initdb -e ${Encoding} -l ${PGLIB} -r ${PGDATA} -u postgres" It can be quite tricky, though, since there are a number of different su versions around. I would prefer it if root were able to run initdb directly and set the ownerships as part of the process. The ability to run as root should only apply to initdb. -- Vote against SPAM: http://www.politik-digital.de/spam/ ======================================== Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID32B8FAA1 ======================================== "Let not sin therefore reign in your mortal body, that ye should obey it in the lusts thereof." Romans 6:12
В списке pgsql-hackers по дате отправления: