From owner-freebsd-ports@FreeBSD.ORG Sat Mar 19 03:11:24 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A1C316A4CE for ; Sat, 19 Mar 2005 03:11:24 +0000 (GMT) Received: from melon.pingpong.net (82.milagro.bahnhof.net [195.178.168.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D9CA43D6B for ; Sat, 19 Mar 2005 03:11:23 +0000 (GMT) (envelope-from girgen@FreeBSD.org) Received: from localhost (localhost.pingpong.net [127.0.0.1]) by melon.pingpong.net (Postfix) with ESMTP id C56C74AFFC; Sat, 19 Mar 2005 04:11:21 +0100 (CET) Received: from melon.pingpong.net ([127.0.0.1]) by localhost (melon.pingpong.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 93259-01-67; Sat, 19 Mar 2005 04:11:21 +0100 (CET) Received: from palle.girgensohn.se (1-2-8-5a.asp.sth.bostream.se [82.182.157.66]) by melon.pingpong.net (Postfix) with ESMTP id 163714AF0A; Sat, 19 Mar 2005 04:11:16 +0100 (CET) Date: Sat, 19 Mar 2005 04:11:15 +0100 From: Palle Girgensohn To: Vivek Khera Message-ID: <79D169B0863C4D6DD7815DE8@palle.girgensohn.se> In-Reply-To: References: <20050314094909.GA1080@tongi.org> <22FD04521EA81D6E4C8D2402@rambutan.pingpong.net> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at pingpong.net cc: FreeeBSD Ports Subject: Re: Changing username of postgresql port X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2005 03:11:24 -0000 --On torsdag, mars 17, 2005 10.12.50 -0500 Vivek Khera wrote: > > 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. Actually, it might even be A Good Thing (tm) to keep them separated, so ppl won't mix them up. I installed postgresql on a windows system yesterday (first time hardly ever use the OS). Anyway, the installer stressed that there shoudl be a system user and postgres super user, and that shoudl prefereably *not* be the same. That said, on unix it is a bit practical to keep them the same, I guess. And I guess you want to be able to configure both user names? > Please see my PR from a few days ago. It is > *trivial* to support this. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=78630 Ah, yes, that's quite trivial. Dunno why I didn't use -l in the first place, plain stupid I guess ;^) I'll commit it promptly! > 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. Yeah, that was the idea. I guess I forgot somewhere along the line... :) > I suppose we could also set the PGUSER equivalent command line args via > twiddles in rc.conf. Nah, better to fix the startup script. /Palle