Re: Alternate DB location continued.

From: Marco Colombo <pgsql(at)esiway(dot)net>
To: Bob Hartung <rwhart(at)mchsi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Alternate DB location continued.
Date: 2005-02-18 14:50:48
Message-ID: Pine.LNX.4.61.0502181549180.2859@Megathlon.ESI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 18 Feb 2005, Bob Hartung wrote:

> Hi again all.
> Here is the situation:
> Fedora Core 3 with all updates.
> PostgreSQL 8.0.1 installed - no tables to update.
> In /etc/profile I have declared:
> PGDATA=/pg_data
> PATH=$PATH:$PGDATA
> export PGDATA
> export PATH
>
> Directory /pg_data exists and is owned by postgres.
> Log in as user postgres and run initdb by itself or with
> -D PGDATA
> -D /pg_data
>
> The output is as follows:
> The files belonging to this database system will be owned by user
> "postgres?.
> This user must also own the server process.
> The database cluster will be initialized with local en_US.UTF-8.
> The default database encoding has accordingly been set to UNICODE.
>
> fixing permissions on existing directory /pg_data . . . ok
> creating directory /pg_data/global ... ok
> creating directory /pg_data/pg_xlog ... ok
> creating directory /pg_data/pg_xlog/archive_status ... ok
> creating directory /pg_data/pg_clog ... ok
> creating directory /pg_data/pg_subtrans ... ok
> creating directory /pg_data/base ... ok
> creating directory /pg_data/base/1 ... ok
> creating directory /pg_data/pb_tblspc ... ok
> selecting default max_connections ... 10
> selecting default shared_buffers ... 50
> creating configuration files ... ok
> creating template1 database in /pg_data/base/1 ... child process
> exited with exit code 1
> initdb: removing contents of data directory "/pg_data"
>
> Does anyone have any idea of where I went wrong? If do not declare and
> export PGDATA or append it to path, everything works fine.
>
> Thanks again for your time. If you responded the other day I may have
> lost your message as I was on the road.

Please read replies here:
http://archives.postgresql.org/pgsql-general/2005-02/msg00832.php

As Tom wrote, it's likely it's SElinux in action.

.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo(at)ESI(dot)it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mohsen Pahlevanzadeh 2005-02-18 15:06:27 I'm newbie
Previous Message Tom Lane 2005-02-18 14:29:05 Re: Alternate DB location continued.