Re: problem with initdb

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: problem with initdb
Date: 2014-01-07 17:29:41
Message-ID: 52CC3985.8030804@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/07/2014 09:11 AM, Susan Cassidy wrote:
> I ran an initdb, but got a message that the Encoding I specified was
> invalid, so I tried to run it again, and now I get:
>
> initdb: directory "/var/lib/pgsql/data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/var/lib/pgsql/data" or run initdb
> with an argument other than "/var/lib/pgsql/data".
>
> The only thing in the $PGDATA directory are the pg_hba.conf and
> postgresql.conf files.

If you want the *.conf files move them somewhere else, otherwise delete
them. The $PGDATA directory needs to totally empty for an initdb to proceed.

>
> If I try to run a pg_ctl start, I get this:
> 17271 2014-01-07 09:10:15.060 PST FATAL: "/var/lib/pgsql/data" is not
> a valid data directory
> 17271 2014-01-07 09:10:15.060 PST DETAIL: File
> "/var/lib/pgsql/data/PG_VERSION" is missing.

The initdb did not complete so the necessary file are not there. Empty
the directory and redo the initdb.

>
>
> What can I do?
>
> This is postgres 8.4, which is the only version currently available for
> Scientific Linux in its repository.
>
> Thanks,
> Susan

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John McKown 2014-01-07 17:33:19 Re: problem with initdb
Previous Message Susan Cassidy 2014-01-07 17:11:21 problem with initdb