On Fri, 16 Jan 2004, Jeff Bowden wrote:
> Nigel J. Andrews wrote:
> >I don't see what the problem is. PostgreSQL is perfectly able to be installed
> >and run as any old user. Even if one is distributing via a package system, such
> >as RPM perhaps, which has problems installing as non-root user if one sees the
> >package already installed then there's no need to try to install it
> >again. Even with the package installations there's bugger all stopping any old
> >user doing an initdb -D myownplace.
> >
> >The standard postgres user on a system is only special in that it is generally
> >the user the postmaster is run as. If you have other non-priviledged users and
> >there's no need for them to share a cluster why try to make them?
> >
> >
>
> I'm sorry, maybe I didn't state my ideas clearly enough. I was
> following on to Tom Lane's suggestion that the Debian and RPM packages
> make configuration "automatic". I was trying to explain that even after
> installation, some administrator configuration is required to make the
> server usable for non-privelidged users. Either in the form of creating
> and dropping databases or in giving the users rights to do it themselves.
>
> The way I'd like to make it work for my app is to run a seperate
> postmaster as the user to avoid involving the machine administrator or
> interfering with other users. If a shared install can be made to work
> in an equivalent way, then I would rather go with that. I'm not clear
> on whether that's possible though. My current understanding is that it
> is not and that my original notion is the only way for my app.
I think I probably didn't do the explanation clearly enough. This does depend
on what you mean by shared install. I was assuming you just wanted to manage
data independently only using the shared binaries installed from the
package. If that's not the case then obviously this isn't what you want. If
that is the case then you could run the following as any old user, provided the
environment has been set appropiately of course:
initdb -D $HOME/pgdata
sed -e 's/^#port = 5432/port = 12345/' $HOME/pgdata/postgresql.conf > /tmp/p
mv /tmp/p $HOME/pgdata/postgresql.conf
pg_ctl -D $HOME/pgdata start
then access the cluster using:
pgsql -P 12345 template1
That's it. That's access as the db superuser for that cluster. Sure if the
system admin upgrades the shared software then you could have problems.
My apologies if I've got the wrong end of things again, I've got a lot of
unread email and I keep reading things in a very haphazard order.
--
Nigel J. Andrews