2

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?

2 Answers 2

3

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

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .