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 Desktop
Packages, which is subscribed to postgresql-common in Ubuntu.
https://bugs.launchpad.net/bugs/1446811

Title:
  PgCommon::get_cluster_socketdir depends on unix_socket_directories
  setting

Status in postgresql-common package in Ubuntu:
  New

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1446811/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to