On Thu, Jul 03, 2003 at 09:50:16AM +0900, John Johnson wrote: > I remember from years ago the joys of kill -9, but don't know > how clean or wise it would be to do it, especially since I > don't know how to restart the processes once I kill them. > Thanks for the /sbin/service advice!
Joys? You want to use -9 only when all other attempts fail. If you are lucky, you will only have a few stale lock files lying around. If you do that to PG, you can corrupt your database. It has seriously been years since I have had to SIGKILL any processes outside of rpm. Most services should behave nicely and quit with SIGTERM (`kill $pid` instead of `kill -9 $pid`). Most SysV-like systems should have service scripts under /etc/init.d. A utility like `service` is simply a wrapper that runs the scripts under that directory. > I would like to store the data in a directory such as /www/db > which would require me to tell the postmaster process on > startup to use the directive -D /www/db. Since this is all > automated, how do I go about doing that? And is the -I option > superfluous since it is started in runtime 3,5? Thanks for the > help!! The script /etc/init.d/postgresql reads a configuration file at /etc/sysconfig/pgsql/postgresql. To setup a custom path, you set the values for PGDATA, PGPORT, and PGOPTS. That being said, I would again advise you to stick with the default paths. -Vince
