pg_ctl start error and lock file

Started by Dev Kumkaralmost 12 years ago3 messagesgeneral
Jump to latest
#1Dev Kumkar
devdas.kumkar@gmail.com

Faced following issue when trying to start database using pg_ctl:

FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission
denied

Accidentally someone cleaned up /tmp and recreated it but without any write
permissions to non-root user, if the non-root user write permissions are
given to /tmp then it would start without any issues.

I was going thru some links and could find following (> 9+ years old
thread):
http://compgroups.net/comp.postgresql.general/postgres-start-error/2886274

Is there any way to control where the lock file can be created?

Regards...

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Dev Kumkar (#1)
Re: pg_ctl start error and lock file

Dev Kumkar wrote:

Faced following issue when trying to start database using pg_ctl:

FATAL: could not create lock file "/tmp/.s.PGSQL.5432.lock": Permission denied

Accidentally someone cleaned up /tmp and recreated it but without any write permissions to non-root
user, if the non-root user write permissions are given to /tmp then it would start without any issues.

I was going thru some links and could find following (> 9+ years old thread):
http://compgroups.net/comp.postgresql.general/postgres-start-error/2886274

Is there any way to control where the lock file can be created?

Set "unix_socket_directory" (in versions before 9.3) or
"unix_socket_directories" (from 9.3 on) in postgresql.conf.

Yours,
Laurenz Albe

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Dev Kumkar
devdas.kumkar@gmail.com
In reply to: Laurenz Albe (#2)
Re: pg_ctl start error and lock file

On Tue, Apr 29, 2014 at 6:26 PM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:

Set "unix_socket_directory" (in versions before 9.3) or
"unix_socket_directories" (from 9.3 on) in postgresql.conf.

Yours,
Laurenz Albe

Fantastic, thanks for this setting.

regards...