From: | Amitabh Kant <amitabhkant(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | David(dot)I(dot)Noel(at)gmail(dot)com, PGSQL Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: initdb error |
Date: | 2012-12-13 16:46:52 |
Message-ID: | CAPTAQBJ-gS=LPOKLiH12U_KaqV1Pczz5UYqFhWbW4mXLYFinDQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Dec 13, 2012 at 10:00 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:
> On 12/13/2012 08:18 AM, David Noel wrote:
>
>> On 12/13/12, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
>>
>>> On 12/13/2012 07:38 AM, David Noel wrote:
>>>
>>>> I'm running into the following error message when running initdb
>>>> (FreeBSD
>>>> host):
>>>>
>>>> ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug
>>>> The files belonging to this database system will be owned by user
>>>> "pgsql".
>>>> This user must also own the server process.
>>>>
>>>> The database cluster will be initialized with locales
>>>> COLLATE: C
>>>> CTYPE: en_US.UTF-8
>>>> MESSAGES: en_US.UTF-8
>>>> MONETARY: en_US.UTF-8
>>>> NUMERIC: en_US.UTF-8
>>>> TIME: en_US.UTF-8
>>>> The default text search configuration will be set to "english".
>>>>
>>>> creating directory /zdb/pgsql/data ... ok
>>>> creating subdirectories ... ok
>>>> selecting default max_connections ... 100
>>>> selecting default shared_buffers ... 32MB
>>>> creating configuration files ... ok
>>>> 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: removing data directory "/zdb/pgsql/data"
>>>>
>>>> My best guess is that it has something to do with permissions, but I
>>>> really have no idea. Has anyone seen this before and found a way
>>>> around it?
>>>>
>>>
>>>
>>> Not quite what is in the the init script in rc.d, have you tried running
>>> the initdb command directly? As you say I believe there are permissions
>>> problems. So following the instructions found below may solve your
>>> problem:
>>>
>>> http://www.postgresql.org/**docs/9.2/interactive/app-**initdb.html<http://www.postgresql.org/docs/9.2/interactive/app-initdb.html>
>>>
>>>
>>>
>>>
>>>> -David
>>>>
>>>>
>>>>
>>>
>>> --
>>> Adrian Klaver
>>> adrian(dot)klaver(at)gmail(dot)com
>>>
>>>
>>
>> I've tried initdb directly:
>>
>> initdb -D /zdb/pgsql/data
>>
>> ...and also through pg_ctl:
>>
>> pg_ctl 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
>>
>
> You are doing the above as the database user ex:postgres?
>
> The database user has permissions on /zdb/pgsql/data?
>
>
>
>> -David
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
>
The rc.d script executes the command as the correct user. This is the line
in rc.d script that runs the initdb command:
su -l -c ${postgresql_class} ${postgresql_user} -c "exec
/usr/local/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data}"
Not sure about his permission though
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2012-12-13 16:47:23 | Re: How to keep the last row of a data set? |
Previous Message | Tom Lane | 2012-12-13 16:35:30 | Re: initdb error |