Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to compile PostgreSQL and need to set a default for unix_socket_location. It should be /var/run/postgresql instead of /tmp like in the default build configuration.

In fact I just want to set a default for the unix_socket_location parameter, but I don't get where to set it. It is no ./configure option, and I don't know where to look anymore, althought the docs say it can be changed during build time.

Where do I set a default for unix_socket_location?

share|improve this question

2 Answers 2

Edit src/include/pg_config_manual.h, change DEFAULT_PGSOCKET_DIR, (re-)build.

share|improve this answer

The parameter you want to set is named unix_socket_directory. It can be configured in the postgresql.conf file. E.g.:

unix_socket_directory = '/var/run/postgresql'

You will probably need to restart PostgreSQL for a changed value of unix_socket_directory to take effect.

I don't know whether the default value can be changed at compile time, but if you set it in your postgresql.conf, the default will never be used.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.