Is it possible to control the location of the lock file when starting postgres? - Mailing list pgsql-general

From Steve Langlois
Subject Is it possible to control the location of the lock file when starting postgres?
Date
Msg-id CY1PR0701MB19327E01ACCBA3E81484ACB287370@CY1PR0701MB1932.namprd07.prod.outlook.com
Whole thread Raw
Responses 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?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Is it possible to control the location of the lock file when starting postgres?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

Using Postgres 9.2 with CentOS7. 


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

I know I can change permissions of /var/run of course but I want to change the location of the lock file to a directory I already have access to. So I really want to change the default location of the lock file to something other than /var/run. I've checked the options to initdb as well as looking at the various files in the data directory, pg_hba.conf, pg_ident.conf, etc.

Thank you.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: upsert with trigger (or rule)
Next
From: Steve Langlois
Date:
Subject: Re: Is it possible to control the location of the lock file when starting postgres?