Re: initdb error

From: David Noel <david(dot)i(dot)noel(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: initdb error
Date: 2012-12-13 18:47:37
Message-ID: CAHAXwYCfXuaQp6KML1Lys=rm1Y3+Mw1gcYEyU1dpvASvzZzfLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/13/12, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Noel <david(dot)i(dot)noel(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-12-13 19:16:32 Re: initdb error
Previous Message David Noel 2012-12-13 18:42:04 Re: initdb error