The pre-existing PostgreSQL SMF service is disabled by default. So, if you (as owner & single user of the machine) don't enable the SMF service, the default port won't be used. So there's nothing really forcing you to run PostgreSQL on a non-default port (I don't understand your statement wrt. being forced to use a non-default port). If you want a PostgreSQL instance that's owned & managed by you and runs on the default port, just call 'initdb' followed by 'pg_ctl start'. This is exactly what you have to do if you download the community version. The presence of the SMF service doesn't prevent you from doing anything that you can't also do on say, Linux. We're not forcing you to use the pre-existing PostgreSQL SMF service. We only ship it so that administrators have an example of how to manage a global PostgreSQL instance using SMF, that they can quickly implement if they wish.
But if you do decide to enable the pre-existing PostgreSQL SMF service, and you want to manage it from your personal username, then yes - you need to assign the necessary privileges. I'm not convinced a wrapper script is necessary though (even if there is one for MySQL) since the command is so simple (and only needs to be run once): # usermod -P "Postgres Administration" <username> If you think there does need to be a script to do this though, then feel free to raise an RFE. It will get reviewed in the PostgreSQL Tech Team meeting (Tuesday). David Van Couvering wrote: > I understand the value of running a "private" instance in the scenario > of multiple developers working on the same machine. But really, how > common is this? > > Meanwhile, in the common case, where I am a developer on my machine > and I'm the only one using it (that's how we all work, right?), I am > now having to run PostgreSQL on a non-default port. And there is > this perfect good pre-existing PostgreSQL SMF service on the default > port that I am not allowed to touch. On a Mac or PC (even on Linux), > I can download PostgreSQL or MySQL, install it, and start running it > on the default port. Nobody seems to complain about this. > > I think Ludo's solution of providing a script to quickly grant the > necessary rights makes a lot of sense. > > I would suggest that if we get a lot of complaints about collisions > between multiple developers trying to use the same instance, then we > can consider the more heavyweight solution of providing a user-generic > SMF service. > > Thanks, > > David > > On Jan 11, 2008 11:15 AM, James Gates <james.gates at sun.com> wrote: > >>I interpreted Ludo's explanation to mean every user that has been >>assigned the RBAC authority with their script can control the *global* >>instance of MySQL/Apache (which the webstack team have defined & >>provided the necessary xml manifest). >> >> >> >>Josh Berkus wrote: >> >>>>Jignesh suggested having multiple SMF services (one for each user, >>>>each with their own PostgreSQL instance, managing their own >>>>databases). This is preferable, and worth pursuing. But I'm not sure >>>>how you can do this with SMF. As far as I'm aware the SMF service >>>>instances have to be predetermined. >>> >>> >>>Hmmm, then how does it work for MySQL? Surely we're not allowing every >>>user on the system to control the *global* instance of MySQL/Apache? >>> >>>--Josh >> > > >