Skip site navigation (1) Skip section navigation (2)

Re: initdb fails quietly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Muratet US-Huntsville" <Michael(dot)Muratet(at)operon(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: initdb fails quietly
Date: 2006-07-22 17:19:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"Michael Muratet US-Huntsville" <Michael(dot)Muratet(at)operon(dot)com> writes:
> I installed postgressql from RH a4_64 rpms. I created a user postgres =
> (non-system UID) and tried to run initdb getting:

> creating template1 database in /data1/postgres_data/base/1 ... child =
> process exited with exit code 1
> initdb: removing contents of data directory "/data1/postgres_data"

Do you have SELinux turned on?  Some of the earlier RHEL4 releases had
selinux rules that prevented /usr/bin/postgres from writing /dev/tty,
which is a reasonable rule for a daemon process but served to prevent
any error messages from appearing in interactive use :-(.  To get around
that you can either temporarily disable selinux, or update to a more
recent set of selinux policy rules.

As for the failure that it's not able to tell you about, that's probably
selinux as well.  I believe the standard policy constrains postgres to
write only under /var/lib/pgsql, which means you *must* put the database
in the default place, unless you want to modify the policy.

You could check in /var/log/messages for "avc denied" messages to
confirm these theories...

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Tom LaneDate: 2006-07-22 17:29:21
Subject: Re: Drop Functions Question Again
Previous:From: Garcia, JoshuaDate: 2006-07-21 23:26:14
Subject: Drop Functions Question Again

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group