Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 63EB0B5DC48 for ; Fri, 26 Aug 2011 05:31:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 93619-06 for ; Fri, 26 Aug 2011 08:31:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 3C0A5B5DBC1 for ; Fri, 26 Aug 2011 05:31:17 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p7Q8VHIQ011789 for ; Fri, 26 Aug 2011 08:31:17 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p7Q8VHTC011788; Fri, 26 Aug 2011 08:31:17 GMT (envelope-from www) Date: Fri, 26 Aug 2011 08:31:17 GMT Message-Id: <201108260831.p7Q8VHTC011788@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6179: "service postgresql-9.0 stop" does not stop postgresql server From: "Ken" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201108/159 X-Sequence-Number: 30971 The following bug has been logged online: Bug reference: 6179 Logged by: Ken Email address: borg@sprint-v.com.ru PostgreSQL version: 9.0.4 Operating system: CentOS 6.0 x86_64 Description: "service postgresql-9.0 stop" does not stop postgresql server Details: Hi. I am use RPM binaries from postgresql.org yum repository. Postgresql started normally ("service postgresql-9.0 start"), but refuse stopping ("service postgresql-9.0 stop"): --------------------------------------------- [root@storage-2 init.d]# service postgresql-9.0 stop ; echo ; sleep 3 ; ps ax | fgrep post Stopping postgresql-9.0 service: Postmaster dead, but subsys exists. [ OK ] 1685 ? Ss 0:00 /usr/libexec/postfix/master 22254 ? S 0:00 /usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data 22262 ? Ss 0:00 postgres: logger process 22264 ? Ss 0:00 postgres: writer process 22265 ? Ss 0:00 postgres: wal writer process 22266 ? Ss 0:00 postgres: autovacuum launcher process 22267 ? Ss 0:00 postgres: stats collector process 22344 pts/2 S+ 0:00 fgrep post [root@storage-2 init.d]# --------------------------------------------- Here proposed patch for /etc/rc.d/init.d/postgresql-9.0 (seems typo, as lockfile in almost cases have zero size): ---------------------------------------------------------------------------- ----------------------- 158c158 < if [ -e "$lockfile" ] && [ ! -s "$lockfile" ] --- > if [ -e "$lockfile" ] && [ ! -s "$pidfile" ] ---------------------------------------------------------------------------- -----------------------