X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2270D5E46C7 for ; Tue, 17 Aug 2004 20:23:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01312-03 for ; Tue, 17 Aug 2004 23:23:10 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by svr1.postgresql.org (Postfix) with ESMTP id 6654C5E46C4 for ; Tue, 17 Aug 2004 20:23:08 -0300 (ADT) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I2M00L016AEEN@asu.edu> for pgsql-admin@postgresql.org; Tue, 17 Aug 2004 16:23:02 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0I2M00L1N6AEAB@asu.edu> for pgsql-admin@postgresql.org; Tue, 17 Aug 2004 16:23:02 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay, nullclient, tcp_wrapped) with ESMTP id i7HNN171001012 for ; Tue, 17 Aug 2004 16:23:01 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id 43AEDD37; Tue, 17 Aug 2004 16:23:02 -0700 (MST) Date: Tue, 17 Aug 2004 16:23:02 -0700 From: David Bear Subject: new install starting backend To: pgsql-admin@postgresql.org Reply-To: David.Bear@asu.edu Message-id: <20040817232302.GG2187@asu.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/151 X-Sequence-Number: 14546 I installed postgres from the freebsd ports collection. Then, after doing the initdb, I tried to run the backend as the postgres user, ie while su'ed as pgsql. I was prompt for a password. Since I had not change and pg_hba.conf settings, nor set a password during the initdb phase, I was surprised by this. When I su'ed back to root, I was able to run the startup script the package had put in /usr/local/etc/rc.d. But, this contradicts: http://www.postgresql.org/docs/7.4/static/postmaster-start.html Different systems have different conventions for starting up daemons at boot time. Many systems have a file /etc/rc.local or /etc/rc.d/rc.local. Others use rc.d directories. Whatever you do, the server must be run by the PostgreSQL user account and not by root or any other user. Therefore you probably should form your commands using su -c '...' postgres. For example: I did check ps ax and found pgsql 39212 0.0 0.4 6292 4376 ?? I 4:15PM 0:00.00 postmaster: stats pgsql 39210 0.0 0.4 7280 4384 ?? I 4:15PM 0:00.00 postmaster: stats pgsql 39206 0.0 0.4 15532 4460 ?? Is 4:15PM 0:00.02 /usr/local/bin/pos which indicates the postmaster is running as the postgresql superuser. So far, all seems okay, but I wanted to check to make sure this looked okay. any comments? -- David Bear phone: 480-965-8257 fax: 480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing"