Re: starting PGSQL automatically on Redhat 6.2 - Mailing list pgsql-general

From Brett W. McCoy
Subject Re: starting PGSQL automatically on Redhat 6.2
Date
Msg-id Pine.LNX.4.30.0101091605110.32554-100000@chapelperilous.net
Whole thread Raw
In response to starting PGSQL automatically on Redhat 6.2  ("Ryan Mahoney" <ryan@paymentalliance.net>)
List pgsql-general
On Tue, 9 Jan 2001, Ryan Mahoney wrote:

> Hey all, I copied the pg_ctl script and placed it in my /etc/rc.d/init.d/
> directory and renamed it 'postgres'.  I then made all the necessary symbolic
> links.  When my machine boots up however, pgsql does not start up because it
> cannot be started by root.  I have created the 'postgres' user and data
> directories.  I can start PG manually just fine.  Can someone post or mail a
> working startup script/recommend any changes to pg_ctl?  Thanks!

You need to su to the postgres user in your script to start the
postmaster:

su postgres -c "postmaster -i ... "

There's a complete example in the installation docs.

-- Brett
                                     http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
History is the version of past events that people have decided to agree on.
        -- Napoleon Bonaparte, "Maxims"


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Removal of book PDF
Next
From: Lee Joramo
Date:
Subject: Re: Re: COPY error: pqReadData() -- backend closed the channel unexpectedly