Thread: PostgreSQL running in the background....

PostgreSQL running in the background....

From
faeiz
Date:
Dear Admins,

I am a new user, and I am running Suse Linux 9.3...
I have sucessfully installed PostgreSQL 8.0.3
The problem I am having is that my postgreSQL does not run in the
background. I have looked at the readme also they do have a command
to get postgres running in the background, but after I restart my
machine, it stops running.. I was wandering if you people could provide
me with a step by step walk through getting postgres running permantly
in the back ground.

Thanks.



--
faeiz

Re: PostgreSQL running in the background....

From
"Kevin Grittner"
Date:
Hello Faeiz,

When setting up our SuSE server, I found this page, and figured that I
should probably comply with the recommendations I found there, even
though we were setting things up "by hand" rather than through an RPM:

http://www.novell.com/coolsolutions/feature/11256.html

We started with the linux script in the contrib/start-scripts directory
of the distribution.  We added this near the front:

### BEGIN INIT INFO
# Provides: postresql
# Required-Start: $local_fs $network $syslog
# Should-Start: nthd
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PostgreSQL RDBMS
# Description: PostgreSQL RDBMS service on port 5432
### END INIT INFO

We found it necessary to change the script to use pg_ctl to start the
service rather than using postmaster directly.

We copied the script to /etc/init.d/ as postgresql, set the executable
flag, and ran the following:

/usr/lib/lsb/install_initd /etc/init.d/postgresql

After that, you can use chkconfig as needed.

This has worked for us, although if there's a flaw in it, I'd welcome
any suggestions.  I'm reluctant to post my entire script publicly
without some review by someone who kinows Linux better than I do, for
fear that my ignorance could cause people more harm than good.

As usual, YMMV, proceed with caution, etc.

The usual Linux advice regarding SHMMAX, scheduling (elevator=deadline),
and file system configuration (/etc/fstab noatime, etc.) applies.  If
you need help with these on SuSE, let me know.

I hope this helps.

-Kevin


>>> faeiz <faeizm@gmail.com>  >>>
Dear Admins,

I am a new user, and I am running Suse Linux 9.3...
I have sucessfully installed PostgreSQL 8.0.3
The problem I am having is that my postgreSQL does not run in the
background. I have looked at the readme also they do have a command
to get postgres running in the background, but after I restart my
machine, it stops running.. I was wandering if you people could provide
me with a step by step walk through getting postgres running permantly
in the back ground.

Thanks.



--
faeiz