Re: [HACKERS] More initdb follies

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: hackers(at)postgreSQL(dot)org, olly(at)linda(dot)lfix(dot)co(dot)uk
Subject: Re: [HACKERS] More initdb follies
Date: 1999-12-09 11:14:28
Message-ID: 199912091114.LAA09862@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
>In my digging around in initdb, I came to the --username option, which
>supposedly allows you to initialize the database system with another
>username. Not a bad idea, really.
>
>Obviously, you'd have to be root in that case, 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 that you 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(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Let not sin therefore reign in your mortal body, that
ye should obey it in the lusts thereof."
Romans 6:12

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-12-09 11:17:33 Re: [HACKERS] memory dilemma
Previous Message Peter Mount 1999-12-09 07:46:00 RE: [HACKERS] Pooled postgresql backends