On 06/16/2012 12:19 PM, Peter Eisentraut wrote:
What I observe:
# /etc/init.d/postgresql start&& echo GOOD
GOOD
# ps aux | fgrep postgres | fgrep -v fgrep
#
Maybe you don't have any clusters created or configured to start?
That was the problem originally, yes.
Please consider applying the attached patch so I am the last to ever run
into this. The patch makes the initscript ..
- produce helpful output and
- return non-zero error code
in that case and works well for me.
Many thanks!
Best,
Sebastian
--- init.d-functions 2012-06-17 00:00:22.805996350 +0200
+++ init.d-functions 2012-06-17 00:09:58.818010006 +0200
@@ -9,9 +9,16 @@
do_ctl_all() {
[ "$1" ] || { echo "Error: invalid command '$1'" >&2; exit 1; }
[ "$2" ] || { echo "Error: invalid version '$2'" >&2; exit 1; }
- [ -d "/etc/postgresql/$2" ] || return 0
- [ "$(ls /etc/postgresql/$2)" ] || return 0
- [ -x "/usr/lib/postgresql/$2/bin/postmaster" ] || return 0
+ [ -d "/etc/postgresql/$2" -a "$(ls /etc/postgresql/$2 2>/dev/null)" ] || {
+ echo "ERROR: Folder /etc/postgresql/$2 is missing or empty." >&2
+ echo " Have you run something like \"pg_createcluster $2 main --start\" already?" >&2
+ echo " See \"man pg_createcluster\" for more details." >&2
+ return 1
+ }
+ [ -x "/usr/lib/postgresql/$2/bin/postmaster" ] || {
+ echo "ERROR: File \"/usr/lib/postgresql/$2/bin/postmaster\" must be executable" >&2
+ return 1
+ }
status=0
log_daemon_msg "$3"