Re: Issues starting database for the first time on Linux - Mailing list pgsql-novice

From Tom Lane
Subject Re: Issues starting database for the first time on Linux
Date
Msg-id 13321.1575465406@sss.pgh.pa.us
Whole thread Raw
In response to Issues starting database for the first time on Linux  (Isaac Braham <isaac.o.braham@gmail.com>)
List pgsql-novice
Isaac Braham <isaac.o.braham@gmail.com> writes:
...
> chown postgres /usr/local/pgsql/data
> su - postgres
> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

> pg_ctl -D /usr/local/pgsql/data -l logfile start - leads to "waiting
> for server to start..../bin/sh: logfile: Permission denied stopped
> waiting pg_ctl: could not start server"

Apparently, you haven't got sufficient privilege to create "logfile".
Given that you just did "su - postgres", that seems to mean that
whatever directory is recorded as being postgres' home directory
(look in /etc/passwd to find out) isn't writable by postgres.
Or, maybe there already is a "logfile" there, but it's not
writable by postgres.  Anyway, get the permissions straightened out,
or tell it to write to a log file located someplace else.

            regards, tom lane



pgsql-novice by date:

Previous
From: Isaac Braham
Date:
Subject: Issues starting database for the first time on Linux
Next
From: "David G. Johnston"
Date:
Subject: Re: Issues starting database for the first time on Linux