From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexandre Becquereau <alex@safelogic.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Startup problem
Date: Mon, 22 Jan 2007 11:10:27 -0500
Message-ID: <18805.1169482227@sss.pgh.pa.us> (raw)
In-Reply-To: <000001c73e17$47369d80$0a01a8c0@ALEX>
References: <000001c73e17$47369d80$0a01a8c0@ALEX>
"Alexandre Becquereau" <alex@safelogic.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, alex@safelogic.com
Subject: Re: Startup problem
In-Reply-To: <18805.1169482227@sss.pgh.pa.us>
References: <000001c73e17$47369d80$0a01a8c0@ALEX> <18805.1169482227@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox