Re: initdb error - Mailing list pgsql-general

From David Noel
Subject Re: initdb error
Date
Msg-id CAHAXwYCfXuaQp6KML1Lys=rm1Y3+Mw1gcYEyU1dpvASvzZzfLQ@mail.gmail.com
Whole thread Raw
In response to Re: initdb error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: initdb error  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: initdb error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On 12/13/12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> David Noel <david.i.noel@gmail.com> writes:
>> I've tried initdb directly:
>> initdb -D /zdb/pgsql/data
>> ...and still seem to wind up with the error:
>> creating template1 database in /zdb/pgsql/data/base/1 ... FATAL:
>> could not open file "pg_xlog/000000010000000000000001" (log file 0,
>> segment 1): No such file or directory
>
> Hm, that eliminates my first theory that the rc.d script is using
> initdb's --xlogdir switch to try to put pg_xlog someplace that doesn't
> exist on your system.  But it seems like this must be some variant of
> that.  A simple permissions problem is not very credible, because at
> this point initdb has successfully made the data directory and a bunch
> of files within it already.
>
> You could get more information by using the --noclean switch to prevent
> removal of the datadir after failure, and then having a look at the
> debris.  Is there a pg_xlog subdirectory inside /zdb/pgsql/data, and if
> so what permissions has it got?  Perhaps it is not a directory, but a
> symlink to somewhere else?
>
>             regards, tom lane
>

ygg:/usr/home/ygg> initdb -D /zdb/pgsql/data --noclean
...
creating template1 database in /zdb/pgsql/data/base/1 ... FATAL:
could not open file "pg_xlog/000000010000000000000001" (log file 0,
segment 1): No such file or directory
child process exited with exit code 1
initdb: data directory "/zdb/pgsql/data" not removed at user's request

ygg:/usr/home/ygg> ll /zdb/pgsql/
total 2
drwx------  14 pgsql  wheel  18 Dec 13 12:42 data

ygg:/usr/home/ygg> ll /zdb/pgsql/data/
total 53
-rw-------  1 pgsql  wheel      4 Dec 13 12:42 PG_VERSION
drwx------  3 pgsql  wheel      3 Dec 13 12:42 base
drwx------  2 pgsql  wheel      2 Dec 13 12:42 global
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_clog
-rw-------  1 pgsql  wheel   4467 Dec 13 12:42 pg_hba.conf
-rw-------  1 pgsql  wheel   1636 Dec 13 12:42 pg_ident.conf
drwx------  4 pgsql  wheel      4 Dec 13 12:42 pg_multixact
drwx------  2 pgsql  wheel      3 Dec 13 12:42 pg_notify
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_serial
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_snapshots
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_stat_tmp
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_subtrans
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_tblspc
drwx------  2 pgsql  wheel      2 Dec 13 12:42 pg_twophase
drwx------  3 pgsql  wheel      3 Dec 13 12:42 pg_xlog
-rw-------  1 pgsql  wheel  19713 Dec 13 12:42 postgresql.conf

ygg:/usr/home/ygg> ll /zdb/pgsql/data/pg_xlog/
total 2
drwx------  2 pgsql  wheel  2 Dec 13 12:42 archive_status


pgsql-general by date:

Previous
From: David Noel
Date:
Subject: Re: initdb error
Next
From: Adrian Klaver
Date:
Subject: Re: initdb error