From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: problem with initdb |
Date: | 2014-01-07 17:33:19 |
Message-ID: | CAAJSdjhEPF=y4hpmRu-uOpM3x3sR0+rMLLCVoiF-aXYQWuRYAg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
If it were me, I'd probably do something like (my id is not root, but I can
use sudo to run something as root)
sudo mv -vn /var/lib/pgsql/data /var/lib/pgsql/data-old
sudo su - postgres #change to user postgres
initdb
pg_ctl start
exit #exit back to my id, from being postgres
If you need to, after doing the "initdb", compare the pg_hba.conf and
postgresql.conf files in the two directories (/var/lib/pgsql/data and
/var/lib/pgsql/data-old
On Tue, Jan 7, 2014 at 11:11 AM, Susan Cassidy <
susan(dot)cassidy(at)decisionsciencescorp(dot)com> 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 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.
>
>
> What can I do?
>
> This is postgres 8.4, which is the only version currently available for
> Scientific Linux in its repository.
>
> Thanks,
> Susan
>
--
Wasn't there something about a PASCAL programmer knowing the value of
everything and the Wirth of nothing?
Maranatha! <><
John McKown
From | Date | Subject | |
---|---|---|---|
Next Message | Anand Kumar, Karthik | 2014-01-07 17:57:40 | Re: Sudden slow down and spike in system CPU causes max_connections to get exhausted |
Previous Message | Adrian Klaver | 2014-01-07 17:29:41 | Re: problem with initdb |