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
?
Edit
src/include/pg_config_manual.h
, changeDEFAULT_PGSOCKET_DIR
, (re-)build.The parameter you want to set is named
unix_socket_directory
. It can be configured in thepostgresql.conf
file. E.g.: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.