June 21st, 2003, 12:22 PM
automatic postrgresql startup?
is it possible to automatically start the postgresql postmaster when i boot up?
June 22nd, 2003, 12:08 PM
All you need to do is place the postmaster startup command in whatever file is used for the boot up of the system.
I can't tell you anymore than that since you havent specified what system you are on, help us help you.
June 24th, 2003, 06:37 PM
sorry, I use linux (slackware 9.0 distribution). I run postgresql version 7.3.2.
June 24th, 2003, 11:29 PM
For Slackware, here is the quick easy answer: just put a line something like this in /etc/rc.d/rc.local
This is assuming the following:
su postgres -c "/usr/local/pgsql/bin/pg_ctl start -o -i -D /usr/local/pgsql/data -s -l /usr/local/pgsql/data/serverlog"
1. the main user for the postgres daemon is 'postgres'. If yours is different, put that user in the 'su [username] -c position.
2. /etc/rc.d/rc.local is already there and already has the shell script header (#!/usr/bin/bash). If not, and you are creating the file for the first time, make sure that #!/usr/bin/bash is at the top of your file, and that the file is chmodded executable.
3. Of course correct for path if your binaries or log are different from the above
See PostgreSQL documentation, or the INSTALL file for more information about the pg_ctl startup options)