Public bug reported: If postgresql.conf does not contain a unix_socket_directories setting, and the /var/run/postgresql directory does not exist, postgresql startup will fail due to underlying postgresql utilties throwing a "Cannot stat /var/run/postgresql" error.
The issue is easy to reproduce: $ sudo /etc/init.d/postgresql stop $ sudo rm -rf /var/run/postgresql $ sudo perl -pi -e 's/unix_socket_directories/#unix_socket_directories/g' /etc/postgresql/9.3/main/postgresql.conf $ psql --version Error: Cannot stat /var/run/postgresql $ pg_lsclusters Error: Cannot stat /var/run/postgresql pg_lsclusters is especially important, because it is run inside the postgresql init.d script *before* the /var/run/postgresql directory is recreated. Adding the unix_socket_directories setting to postgresql.conf is a simple workaround. Filing this bug more for documentation purposes. ** Affects: postgresql-common (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1446811 Title: PgCommon::get_cluster_socketdir depends on unix_socket_directories setting To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1446811/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs