Unable to stop postgresql ("failed") -> [SOLVED]

Started by Denis BUCHERover 15 years ago3 messagesgeneral
Jump to latest
#1Denis BUCHER
dbucherml@hsolutions.ch

Dear all,

For once, I will simply publish a solution instead of asking a question.
Let's hope it will be useful to someone.

I was unable to stop postgres, I always got "[FAILED] :
* /etc/init.d/postgresql stop
* service postgresql stop
* /sbin/service postgresql stop

The only solution that worked in that case was :
* /usr/bin/pg_ctl stop

Have a nice day !

Denis

#2Thom Brown
thom@linux.com
In reply to: Denis BUCHER (#1)
Re: Unable to stop postgresql ("failed") -> [SOLVED]

On 6 August 2010 17:49, Denis BUCHER <dbucherml@hsolutions.ch> wrote:

Dear all,

For once, I will simply publish a solution instead of asking a question.
Let's hope it will be useful to someone.

I was unable to stop postgres, I always got "[FAILED] :
 * /etc/init.d/postgresql stop
 * service postgresql stop
 * /sbin/service postgresql stop

The only solution that worked in that case was :
 *  /usr/bin/pg_ctl stop

Have a nice day !

Denis

Surely it depends what the packager put into the init.d script? Plus
there's the "zap" option for some setups if you're desperate, although
I don't know if that issues a SIGINT or a SIGQUIT. Hopefully the
former. But really your init.d script should be issuing that pg_ctl
stop command anyway, so don't know why you're getting failed messages.

--
Thom Brown
Registered Linux user: #516935

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thom Brown (#2)
Re: Unable to stop postgresql ("failed") -> [SOLVED]

Thom Brown <thom@linux.com> writes:

On 6 August 2010 17:49, Denis BUCHER <dbucherml@hsolutions.ch> wrote:

I was unable to stop postgres, I always got "[FAILED] :
�* /etc/init.d/postgresql stop
�* service postgresql stop
�* /sbin/service postgresql stop

Surely it depends what the packager put into the init.d script? Plus
there's the "zap" option for some setups if you're desperate, although
I don't know if that issues a SIGINT or a SIGQUIT. Hopefully the
former. But really your init.d script should be issuing that pg_ctl
stop command anyway, so don't know why you're getting failed messages.

I'm wondering about permissions problems. initscripts normally only
work when called by root. Being able to call pg_ctl directly suggests
he was logged in as the postgres user.

regards, tom lane