Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 130789FB529 for ; Mon, 22 Jan 2007 12:10:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 66309-05 for ; Mon, 22 Jan 2007 12:10:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 69CF49FB25E for ; Mon, 22 Jan 2007 12:10:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0MGARnk018806; Mon, 22 Jan 2007 11:10:27 -0500 (EST) To: "Alexandre Becquereau" cc: pgsql-admin@postgresql.org Subject: Re: Startup problem In-reply-to: <000001c73e17$47369d80$0a01a8c0@ALEX> References: <000001c73e17$47369d80$0a01a8c0@ALEX> Comments: In-reply-to "Alexandre Becquereau" message dated "Mon, 22 Jan 2007 12:20:07 +0100" Date: Mon, 22 Jan 2007 11:10:27 -0500 Message-ID: <18805.1169482227@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/196 X-Sequence-Number: 24352 "Alexandre Becquereau" writes: > I have a problem running Postgres at startup. I use the > start-scripts/linux script in /etc/rc.local. The one in our contrib/? That's pretty old, crufty, and unmaintained. The one most people actually use on RPM-based systems is the one that comes with our RPM distribution ... is there a reason you're not using the RPM? Anyway I would guess the problem comes from the fact that the contrib script uses "su". The RPM script doesn't: # For SELinux we need to use 'runuser' not 'su' if [ -x /sbin/runuser ] then SU=runuser else SU=su fi and eventually $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null but you really ought to adopt the whole script not just that one bit. > I previously used a 7.6 version on Fedora Core 3 and there was no problem > launching it on boot. I believe FC3 didn't have SELinux security ... it certainly didn't have it enabled by default. regards, tom lane