pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Killing only one postmaster
7+ messages / 6 participants
[nested] [flat]

* Killing only one postmaster
@ 2003-04-11 14:40  Bo Stewart <stewarrb@yahoo.com>
  0 siblings, 4 replies; 7+ messages in thread

From: stewarrb@yahoo.com @ 2003-04-11 14:40 UTC (permalink / raw)
  To: pgsql-admin

How do I stop only one postmaster and not have the entire server
restart?  Is this possible.  I have had several situations where I
have a function not performing as I expect and need to kill just the
backend process.


Thanks,
Bo Stewart




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-11 18:27  mallah@trade-india.com
  parent: Bo Stewart <stewarrb@yahoo.com>
  3 siblings, 0 replies; 7+ messages in thread

From: mallah@trade-india.com @ 2003-04-11 18:27 UTC (permalink / raw)
  To: stewarrb@yahoo.com; +Cc: pgsql-admin



I think there is only one postmaster and multiple backends.

To cancel the query being executed by a particular backend pid
use

kill -INT <pid_of_the_backend>
its equivalent to pressing ^C in psql for that query.

regds
mallah.

> How do I stop only one postmaster and not have the entire server
> restart?  Is this possible.  I have had several situations where I have a function not
> performing as I expect and need to kill just the backend process.
>
>
> Thanks,
> Bo Stewart
>
>
> ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and
> unsubscribe commands go to majordomo@postgresql.org



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-11 21:18  Michiel Lange <michiel@minas.demon.nl>
  parent: Bo Stewart <stewarrb@yahoo.com>
  3 siblings, 0 replies; 7+ messages in thread

From: Michiel Lange @ 2003-04-11 21:18 UTC (permalink / raw)
  To: mallah@trade-india.com; +Cc: stewarrb@yahoo.com; pgsql-admin

There can also be multiple backends... look for the PID you want to kill 
(SIGHUP or SIGTERM) in your $PGDATA/postmaster.pid file

Michiel
At 23:57 11-4-2003 +0530, mallah@trade-india.com wrote:


>I think there is only one postmaster and multiple backends.
>
>To cancel the query being executed by a particular backend pid
>use
>
>kill -INT <pid_of_the_backend>
>its equivalent to pressing ^C in psql for that query.
>
>regds
>mallah.
>
> > How do I stop only one postmaster and not have the entire server
> > restart?  Is this possible.  I have had several situations where I have 
> a function not
> > performing as I expect and need to kill just the backend process.
> >
> >
> > Thanks,
> > Bo Stewart
> >
> >
> > ---------------------------(end of 
> broadcast)--------------------------- TIP 1: subscribe and
> > unsubscribe commands go to majordomo@postgresql.org
>
>
>
>-----------------------------------------
>Get your free web based email at trade-india.com.
>    "India's Leading B2B eMarketplace.!"
>http://www.trade-india.com/
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-12 00:20  codeWarrior <GPatnude@adelphia.net>
  parent: Bo Stewart <stewarrb@yahoo.com>
  3 siblings, 1 reply; 7+ messages in thread

From: codeWarrior @ 2003-04-12 00:20 UTC (permalink / raw)
  To: pgsql-admin

Get the process id of your postmaster's...

# ps ax | grep postmaster
# kill (pidnumber of the seletcted postmaster)



"Bo Stewart" <stewarrb@yahoo.com> wrote in message
news:9a41d107.0304110640.374e1dd@posting.google.com...
> How do I stop only one postmaster and not have the entire server
> restart?  Is this possible.  I have had several situations where I
> have a function not performing as I expect and need to kill just the
> backend process.
>
>
> Thanks,
> Bo Stewart




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-12 08:56  H. Etzel <hetzel.devel@web.de>
  parent: codeWarrior <GPatnude@adelphia.net>
  0 siblings, 1 reply; 7+ messages in thread

From: H. Etzel @ 2003-04-12 08:56 UTC (permalink / raw)
  To: pgsql-admin

I think this does not work!!
I have had the same Problem, but after I killed on connection all other 
connection were reseted!!

codeWarrior wrote:
> Get the process id of your postmaster's...
> 
> # ps ax | grep postmaster
> # kill (pidnumber of the seletcted postmaster)
> 
> 
> 
> "Bo Stewart" <stewarrb@yahoo.com> wrote in message
> news:9a41d107.0304110640.374e1dd@posting.google.com...
>> How do I stop only one postmaster and not have the entire server
>> restart?  Is this possible.  I have had several situations where I
>> have a function not performing as I expect and need to kill just the
>> backend process.
>>
>>
>> Thanks,
>> Bo Stewart




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-12 16:35  Tom Lane <tgl@sss.pgh.pa.us>
  parent: H. Etzel <hetzel.devel@web.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2003-04-12 16:35 UTC (permalink / raw)
  To: hetzel.devel@web.de; +Cc: pgsql-admin

"H. Etzel" <hetzel.devel@web.de> writes:
> I think this does not work!!
> I have had the same Problem, but after I killed on connection all other 
> connection were reseted!!

You're not supposed to do it like that --- use "kill -INT pid" not
a plain kill.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Killing only one postmaster
@ 2003-04-14 16:45  Michiel Lange <michiel@minas.demon.nl>
  parent: Bo Stewart <stewarrb@yahoo.com>
  3 siblings, 0 replies; 7+ messages in thread

From: Michiel Lange @ 2003-04-14 16:45 UTC (permalink / raw)
  To: codeWarrior <gpatnude@hotmail.com>; +Cc: pgsql-admin

It is even easier:
pg_ctl -D <directory> stop

and if you want to do it the hardcore way:
kill -TERM `head -n 1 <data dir>`

The problem with the ps command is probably that it may be hard to find out 
which postmaster you are about to kill...
hence the directory approach...

Michiel
At 17:20 11-4-2003 -0700, codeWarrior wrote:
>Get the process id of your postmaster's...
>
># ps ax | grep postmaster
># kill (pidnumber of the seletcted postmaster)
>
>
>
>"Bo Stewart" <stewarrb@yahoo.com> wrote in message
>news:9a41d107.0304110640.374e1dd@posting.google.com...
> > How do I stop only one postmaster and not have the entire server
> > restart?  Is this possible.  I have had several situations where I
> > have a function not performing as I expect and need to kill just the
> > backend process.
> >
> >
> > Thanks,
> > Bo Stewart
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2003-04-14 16:45 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-11 14:40 Killing only one postmaster Bo Stewart <stewarrb@yahoo.com>
2003-04-11 18:27 ` mallah@trade-india.com
2003-04-11 21:18 ` Michiel Lange <michiel@minas.demon.nl>
2003-04-12 00:20 ` codeWarrior <GPatnude@adelphia.net>
2003-04-12 08:56   ` H. Etzel <hetzel.devel@web.de>
2003-04-12 16:35     ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-14 16:45 ` Michiel Lange <michiel@minas.demon.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox