Changing username of postgresql port
vivek at khera.org
Thu Mar 17 07:12:54 PST 2005
On Mar 14, 2005, at 6:56 AM, Palle Girgensohn wrote:
> You're not the first to ask about this, and I'd like to make the
> username dynamic. I do think it shall default to pgsql though, at
> least if the userid already exists, so running configs will not break.
> If you want to send me patches, please do, I'll be much obliged. :-)
I don't think it is so much important that the *system* user be
configurable as it is that the postgres super-user be configurable.
That's all the postgres server cares about, and that's what shows up in
the dumps. It doesn't matter that the superuser name is not the same
as that of the system account. Please see my PR from a few days ago.
It is *trivial* to support this.
With this in place, I just edit ~pgsql/.profile to set PGUSER=postgres
(and export it), then
su - pgsql -c 'initdb -U postgres'
and my whole PG system is now using "postgres" as the super user. I
suppose we could also set the PGUSER equivalent command line args via
twiddles in rc.conf.
Vivek Khera, Ph.D.
More information about the freebsd-ports