In the file /etc/init.d/postgresql-9.4 should be renamed "unix_socket_directory" in "unix_socket_directories" Look http://www.postgresql.org/docs/9.4/static/runtime-config-connection.html unix_socket_directories (string) ... Reproducible: Always Expected Results: ... socket_path=$(get_config unix_socket_directories) ...
this seems to be the same also for 9.3
This changed in 9.3 and nobody noticed for a long time. Most likely due to PostgreSQL being responsible for the socket creation. The fix isn't a simple rename of unix_socket_directory to unix_socket_directories. The initscript will have to support a comma-delimited list of directories that the socket can be created in. So, rather than just checking and/or creating one socket directory, it'll have to be able to do so for multiple directories.
*postgresql-9.4.3 (04 Jun 2015) *postgresql-9.3.8 (04 Jun 2015) *postgresql-9.2.12 (04 Jun 2015) *postgresql-9.1.17 (04 Jun 2015) *postgresql-9.0.21 (04 Jun 2015) 04 Jun 2015; Aaron W. Swenson <titanofold@gentoo.org> +postgresql-9.0.21.ebuild, +postgresql-9.1.17.ebuild, +postgresql-9.2.12.ebuild, +postgresql-9.3.8.ebuild, +postgresql-9.4.3.ebuild, +files/postgresql.init-9.3: Version bump resolves issue where file permission issues can cause PostgreSQL to fail to start after a crash. (https://wiki.postgresql.org/wiki/May_2015_Fsync_Permissions_Bug) Fixed bug 550470: 9.4+ will use native system libraries other than OSSP's will be used when possible. Fixed bug 550442: Updated initscript for 9.3+ to recognize and fully support unix_socket_directories.