Обсуждение: Postgresql does not start on reboot

Поиск
Список
Период
Сортировка

Postgresql does not start on reboot

От
"Clodoaldo Pinto"
Дата:
Postgresql does not start on reboot but starts normally with "pg_ctl
start". Running FC5 with selinux enabled.

# chkconfig --list postgresql
postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off

/etc/selinux/config:

SELINUX=enforcing
SELINUXTYPE=targeted
SETLOCALDEFS=0

In /var/log/messages there is this message:

kernel: audit(1151719618.110:4): avc:  denied  { search } for
pid=1849 comm="postmaster" name="/" dev=sdb1 ino=2
scontext=system_u:system_r:postgresql_t:s0
tcontext=system_u:object_r:file_t:s0 tclass=dir

There is a simlink in /var/lib/pgsql/data pointing to /disk2/pg_xlog
which is in sbd1 and is owned by postgres.

If is this a selinux problem, how can I configure it to let postgres
use the pg_xlog dir in /disk2 on startup?

Regards, Clodoaldo Pinto

Re: Postgresql does not start on reboot

От
Tom Lane
Дата:
"Clodoaldo Pinto" <clodoaldo.pinto@gmail.com> writes:
> There is a simlink in /var/lib/pgsql/data pointing to /disk2/pg_xlog
> which is in sbd1 and is owned by postgres.

You need to modify the selinux policy to let the postmaster access
/disk2/pg_xlog ... by default, it's constrained to only be able to touch
stuff under /var/lib/pgsql.

            regards, tom lane

Re: Postgresql does not start on reboot

От
"Clodoaldo Pinto"
Дата:
2006/7/1, Tom Lane <tgl@sss.pgh.pa.us>:
> "Clodoaldo Pinto" <clodoaldo.pinto@gmail.com> writes:
> > There is a simlink in /var/lib/pgsql/data pointing to /disk2/pg_xlog
> > which is in sbd1 and is owned by postgres.
>
> You need to modify the selinux policy to let the postmaster access
> /disk2/pg_xlog ... by default, it's constrained to only be able to touch
> stuff under /var/lib/pgsql.

I followed this:
http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385

I will reboot in a few days and then I will know if it is fixed.

Clodoaldo