PgCommon::get_cluster_socketdir depends on unix_socket_directories setting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
If postgresql.conf does not contain a unix_socket_
The issue is easy to reproduce:
$ sudo /etc/init.
$ sudo rm -rf /var/run/postgresql
$ sudo perl -pi -e 's/unix_
$ 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_
To be honest this is mostly a wontfix. Either you do use the postgresql-common integration tools, then we need to assume that the config files from pg_createcluster don't get broken. Or you don't use the postgresql-common tools and do everything by yourself, that's also okay. But mixing the two is just too brittle, as there are so many combinations that it's hard to impossible to test them all.