postgresql-common 154ubuntu1 checks for existence of /var/run/postgresql and terminates before it has change to create via 'start' function in /usr/share/postgresql-common/init.d-functions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The init script /etc/init.
start|
if [ -z "`pg_lsclusters -h`" ]; then
exit 0
fi
pg_lsclusters -h command will return an empty string (to STDOUT) if /var/run/postgresql does not exist.
/var/run/postgresql does not get initialized however until the init script can reach a call to 'start' from /usr/share/
start() {
# create socket directory
if [ -d /var/run/postgresql ]; then
chmod 2775 /var/run/postgresql
else
install -d -m 2775 -o postgres -g postgres /var/run/postgresql
[ -x /sbin/restorecon ] && restorecon -R /var/run/postgresql || true
fi
do_ctl_all start "$1" "Starting PostgreSQL $1 database server"
}
/var/run is a volatile file system by default in Trusty - so on reboot /var/run/postgresql will not exist.
Essentially, postgresql will fail to start on reboot.