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
Default

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:

Code:
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 . "
fi
Conversely, have to shutdown the server, hence in rc.shutdown:
Code:
if [ -f /media/hda11/postgresql/postmaster.pid ]; then
	su -l _postgresql -c "/usr/local/bin/pg_ctl stop -m fast \
	     -D /media/hda11/postgresql"
	rm -f /media/hda11/postgresql/postmaster.pid
fi
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