From owner-freebsd-ports@FreeBSD.ORG Thu Mar 17 15:12:54 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 03F3016A4CE; Thu, 17 Mar 2005 15:12:54 +0000 (GMT) Received: from yertle.kcilink.com (yertle.kcilink.com [65.205.34.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BE7343D41; Thu, 17 Mar 2005 15:12:51 +0000 (GMT) (envelope-from vivek@khera.org) Received: from [192.168.7.103] (host-103.int.kcilink.com [192.168.7.103]) by yertle.kcilink.com (Postfix) with ESMTP id 926F5B857; Thu, 17 Mar 2005 10:12:50 -0500 (EST) In-Reply-To: <22FD04521EA81D6E4C8D2402@rambutan.pingpong.net> References: <20050314094909.GA1080@tongi.org> <22FD04521EA81D6E4C8D2402@rambutan.pingpong.net> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Vivek Khera Date: Thu, 17 Mar 2005 10:12:50 -0500 To: Palle Girgensohn X-Mailer: Apple Mail (2.619.2) 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: Thu, 17 Mar 2005 15:12:54 -0000 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. http://www.freebsd.org/cgi/query-pr.cgi?pr=78630 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. +1-301-869-4449 x806