Trouble starting postgresql

Andreas Roth aroth at arsoft-online.com
Tue May 23 19:05:02 UTC 2006


Hi,

i had the same problem on my FC4 system. The problem is caused by SELinux. You 
can just disable SELinux on the whole system or disable SELinux for 
postgresql. 
The proper way would be to set the correct security contexts to 
the /home/pgsql directory (using ls -Z and chcon). I haven't tried this, but 
AFAIK it should work.

Regards,
Andreas

On Tuesday 23 May 2006 20:42, Alan M. Evans wrote:
> 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