Lists: | pgsql-general |
---|
From: | "Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)com> |
---|---|
To: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Postgresql does not start on reboot |
Date: | 2006-07-01 18:48:32 |
Message-ID: | a595de7a0607011148u59556a3ayf2c87df267e1bc1b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
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
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)com> |
Cc: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Postgresql does not start on reboot |
Date: | 2006-07-01 19:09:16 |
Message-ID: | 3363.1151780956@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
"Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)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
From: | "Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Postgresql does not start on reboot |
Date: | 2006-07-01 21:47:28 |
Message-ID: | a595de7a0607011447g4b93c5f0hed5ae06fba114f41@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
2006/7/1, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)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