Re: Is it possible to control the location of the lock file when starting postgres?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is it possible to control the location of the lock file when starting postgres?
Дата
Msg-id 16354.1468965669@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is it possible to control the location of the lock file when starting postgres?  (Steve Langlois <steve.langlois@tavve.com>)
Ответы Re: Is it possible to control the location of the lock file when starting postgres?  (Steve Langlois <steve.langlois@tavve.com>)
Re: Is it possible to control the location of the lock file when starting postgres?  (Steve Langlois <steve.langlois@tavve.com>)
Список pgsql-general
Steve Langlois <steve.langlois@tavve.com> writes:
> I ran
> + /usr/bin/initdb --pgdata=/usr/xxx/databases/pgsql/data --auth=ident
> without issue however when I try to start the database it complains about the lockfile.
> FATAL:  could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied

The problem is not the lock file.  The problem is that it wants to create
a socket file there.  You should be able to fix this by changing the value
of unix_socket_directories.

Presumably, you are working with a distro-modified version of Postgres,
because the stock sources don't use /var/run/postgresql as a socket
directory.  You will likely find that your version of libpq.so also
expects /var/run/postgresql as the socket directory, so you won't be
able to make non-TCP connections without explicitly specifying /tmp
(or wherever you choose to put the socket) as the host location.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Is it possible to control the location of the lock file when starting postgres?
Следующее
От: Steve Langlois
Дата:
Сообщение: Re: Is it possible to control the location of the lock file when starting postgres?