View Single Post
  #3   (View Single Post)  
Old 26th October 2008
lvlamb's Avatar
lvlamb lvlamb is offline
Real Name: Louis V. Lambrecht
Spam Deminer
Join Date: May 2008
Location: .be
Posts: 221

Since you don't mention the OS you are running on, here are my settings for OpenBSD.
No links of any sort.

In rc.local:

if [ -x /usr/local/bin/pg_ctl ]; then
	echo -n ' postgreSQL . '
	su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start \
	    -D /media/hda11/postgresql -l /media/hda11/postgresql/logfile \
	    -o '-D /media/hda11/postgresql' >/dev/null"
	echo -n " started . "
Conversely, have to shutdown the server, hence in rc.shutdown:
if [ -f /media/hda11/postgresql/ ]; then
	su -l _postgresql -c "/usr/local/bin/pg_ctl stop -m fast \
	     -D /media/hda11/postgresql"
	rm -f /media/hda11/postgresql/
In this case, /media/hda11
is a ext2fs essentially shared among other OSes,
all that is needed is that both {_postgresql|postgresql} GID and UID need be the same in any accessing OS.

Got the db directories working across OSes with symlinks only when GID and UID are the same.
rc.local/rc.shutdown method are more explicit.
da more I know I know I know nuttin'
Reply With Quote