Skip site navigation (1) Skip section navigation (2)

Re: Startup problem

From: "Alexandre Becquereau" <alex(at)safelogic(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Startup problem
Date: 2007-01-22 16:18:28
Message-ID: 007801c73e40$f3ddfff0$0a01a8c0@ALEX (view raw or flat)
Thread:
Lists: pgsql-admin
Thank you, i replaced the su command by runuser and everything works
perfectly now!

 Regards,

Alexandre BECQUEREAU
--
SafeLogic
www.safelogic.com
www.pgeep.com


-----Message d'origine-----
De : Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Envoyé : lundi 22 janvier 2007 17:10
À : Alexandre Becquereau
Cc : pgsql-admin(at)postgresql(dot)org
Objet : Re: [ADMIN] Startup problem 

"Alexandre Becquereau" <alex(at)safelogic(dot)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



In response to

pgsql-admin by date

Next:From: Alvaro HerreraDate: 2007-01-22 16:47:19
Subject: Re: server process (PID xxx) was terminated by signal 7
Previous:From: Tom LaneDate: 2007-01-22 16:10:27
Subject: Re: Startup problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group