Re: Having problem with postgresql configuration (template1 doesn't exist)?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Having problem with postgresql configuration (template1 doesn't exist)?
Дата
Msg-id 15094.1108921716@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Having problem with postgresql configuration (template1 doesn't exist)?  (Vinicius <cviniciusm@terra.com.br>)
Ответы Re: Having problem with postgresql configuration (template1 doesn't
Список pgsql-admin
Vinicius <cviniciusm@terra.com.br> writes:
> postgres$ initdb -D /usr/local/pgsql/data"

> the file /var/log/messages shows:
> "Feb 20 02:01:38 ronin kernel: audit(1108875698.227:0): avc:  denied  {
> write } for  pid=8229 exe=/usr/bin/postgres name=data
> dev=dm-0 ino=1687533 scontext=user_u:system_r:postgresql_t
> tcontext=root:object_r:usr_t tclass=dir

You can't put the data directory in a nonstandard place under SELinux
unless you modify the security policy to allow the postgres daemon to
write in that nonstandard place.  The normal behavior of
selinux-policy-targeted is to confine postgres to /var/lib/pgsql.

So: (1) use /var/lib/pgsql/data, (2) modify the policy, or (3)
disable SELinux enforcement.

BTW, since you are using the RPMs, why are you bothering with manual
database setup?  "sudo /sbin/service postgresql start" is all you
need to do.

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: Vinicius
Дата:
Сообщение: Having problem with postgresql configuration (template1 doesn't exist)?
Следующее
От: Vinicius
Дата:
Сообщение: Re: Having problem with postgresql configuration (template1 doesn't