Trouble starting postgresql

Alan M. Evans ame1 at extratech.com
Tue May 23 18:42:21 UTC 2006


Hello!

On my FC5 server, I wanted to configure postgresql to use
/home/pgsql/data instead of /var/lib/pgsql/data. (/home partition is
huge and doesn't get formatted when system is upgraded or new system
installed.) I created the directory, ran initdb; everything seemed ok.

Research seemed to tell me that I should perform the reconfiguration in
/etc/sysconfig/pgsql. However, I could not start the service when the
new directory was specified there. Much experimentation led me to this:

[root at citadel ~]# rm -f /home/pgsql/pgstartup.log
[root at citadel ~]# cp /etc/rc.d/init.d/postgresql
/etc/rc.d/init.d/postgresql2
cp: overwrite `/etc/rc.d/init.d/postgresql2'? y
[root at citadel ~]# cp /etc/sysconfig/pgsql/postgresql
/etc/sysconfig/pgsql/postgresql2
cp: overwrite `/etc/sysconfig/pgsql/postgresql2'? y
[root at citadel ~]# cat /etc/sysconfig/pgsql/postgresql
PGDATA=/home/pgsql/data
PGLOG=/home/pgsql/pgstartup.log
[root at citadel ~]# service postgresql start
Starting postgresql service:                               [FAILED]
[root at citadel ~]# service postgresql2 start
Starting postgresql2 service:                              [  OK  ]
[root at citadel ~]# service postgresql2 stop
Stopping postgresql2 service:                              [  OK  ]
[root at citadel ~]# cat /home/pgsql/pgstartup.log
postmaster cannot access the server configuration file
"/home/pgsql/data/postgresql.conf": Permission denied
LOG:  logger shutting down
[root at citadel ~]#

To sum up: I made an exact copy of the server startup script and an
exact copy of my configuration script. The copy starts, but the original
fails.

Obviously, I'm missing something fundamental here. Any help is
appreciated as I am at the end of ideas.





More information about the fedora-list mailing list