dbTalk Databases Forums  

[BUGS] problem with kill script

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] problem with kill script in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
julien
 
Posts: n/a

Default [BUGS] problem with kill script - 04-11-2006 , 03:08 PM






Hello,

I'm posted a short modification of the kill command.

The INSTALL file mention the command "kill `cat
/usr/local/pgsql/data/postmaster.pid`" but the pid file contain the pid
but not only, it also contain data directory and some numbers (memory
usage ?, database characteristic ?)

So when I run the above kill command I get :

pcbu-testiris:/etc/rc6.d# /etc/init.d/postgres stop
Stopping database server: PostgreSQL/etc/init.d/postgres: line 11: kill:
/usr/local/pgsql/data: no such pid
/etc/init.d/postgres: line 11: kill: (5432001) - Aucun processus de ce type
/etc/init.d/postgres: line 11: kill: (9076763) - Aucun processus de ce type
..

So I add a "head -1" to the command :

kill `cat /usr/local/pgsql/data/postmaster.pid | head -1`

Julien

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] problem with kill script - 04-11-2006 , 03:48 PM






julien <julien (AT) nura (DOT) no-ip.com> writes:
Quote:
The INSTALL file mention the command "kill `cat
/usr/local/pgsql/data/postmaster.pid`" but the pid file contain the pid
but not only, it also contain data directory and some numbers (memory
usage ?, database characteristic ?)
Hm, I wonder why this documentation isn't recommending "pg_ctl stop"
instead. runtime.sgml gets it right:

<screen>
$ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput>
</screen>

but the text in installation.sgml seems much older.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.