--howdy:

--not that the process is doing a lot or taking up
--a lot of resources, it's just something
--that i allow the users to kill and then
--it get's passed to me for correction if the
--simple 'kill <pid>' thing doesn't work.

--what i'm trying to understand is if there
--is a way to do this without having to restart
--the database (remember, it's still production)
--everytime there is a runaway process AND not
--kill -9 <pid>.

--how can i do this?

-X

-----Original Message-----
From: Shridhar Daithankar [mailto:shridhar_daithankar@persistent.co.in]
Sent: Thursday, September 19, 2002 10:45 AM
To: 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] killing process question


On 19 Sep 2002 at 10:39, Johnson, Shaunn wrote:

> 
> --thanks for the reply:
> 
> --no, I don't see anything like that. this is what I have:
> 
> [snip]
> 
> postgres 3488 5.6 0.0 11412 4 pts/4 T Sep18 88:53 postgres: 
> joetestdb 16.xx.xx.xx SELECT
> [/snip]
> 
> --this tells me that this proc had been running once upon a time (since
the 
> 18th) and 
> --has stopped (the 'T'). the user has said that he had since killed the
tool
> --that connected to the database and booted his machine.
> 
> --so ... when I do a 'kill pid' or 'kill -TERM pid' ... *poof* ... nothing

> happens ...

Does restarting database helps? It may just make the thing go away..

Or stop the database, kill the pid with -9 and start it again.. Nothing
lost..

Bye
 Shridhar

--
Shedenhelm's Law:	All trails have more uphill sections than they have
downhill 
sections.


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org





RE: [GENERAL] killing process question


--howdy:

--not that the process is doing a lot or taking up
--a lot of resources, it's just something
--that i allow the users to kill and then
--it get's passed to me for correction if the
--simple 'kill <pid>' thing doesn't work.

--what i'm trying to understand is if there
--is a way to do this without having to restart
--the database (remember, it's still production)
--everytime there is a runaway process AND not
--kill -9 <pid>.

--how can i do this?

-X

-----Original Message-----
From: Shridhar Daithankar [mailto:shridhar_daithankar@persistent.co.in]
Sent: Thursday, September 19, 2002 10:45 AM
To: 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] killing process question


On 19 Sep 2002 at 10:39, Johnson, Shaunn wrote:

> 
> --thanks for the reply:
> 
> --no, I don't see anything like that. this is what I have:
> 
> [snip]
> 
> postgres 3488 5.6 0.0 11412 4 pts/4 T Sep18 88:53 postgres: 
> joetestdb 16.xx.xx.xx SELECT
> [/snip]
> 
> --this tells me that this proc had been running once upon a time (since the 
> 18th) and 
> --has stopped (the 'T'). the user has said that he had since killed the tool
> --that connected to the database and booted his machine.
> 
> --so ... when I do a 'kill pid' or 'kill -TERM pid' ... *poof* ... nothing 
> happens ...

Does restarting database helps? It may just make the thing go away..

Or stop the database, kill the pid with -9 and start it again.. Nothing lost..

Bye
 Shridhar

--
Shedenhelm's Law:       All trails have more uphill sections than they have downhill 
sections.


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Thu, 19 Sep 2002 11:19:03 -0400
"Johnson, Shaunn" <SJohnson6@bcbsm.com>
Re: killing process question
On 19 Sep 2002 at 11:19, Johnson, Shaunn wrote:

> 
> --howdy:
> --not that the process is doing a lot or taking up
> --a lot of resources, it's just something
> --that i allow the users to kill and then
> --it get's passed to me for correction if the
> --simple 'kill <pid>' thing doesn't work.
> --what i'm trying to understand is if there
> --is a way to do this without having to restart
> --the database (remember, it's still production)
> --everytime there is a runaway process AND not
> --kill -9 <pid>.
> --how can i do this?

I did a quick 'grep -rin' on postgresql source code I have(CVS, a week old). 
Looks like postgresql backend is ignoring the SISPIPE which is delivered to 
backend process when other end is closed. Obviously this is going to cause 
hanging back-ends.

I guess a backend should terminate as if connection is closed. What say? 



Bye
 Shridhar

--
Guillotine, n.:	A French chopping center.


Thu, 19 Sep 2002 20:58:29 +0530
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
Re: killing process question
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> I guess a backend should terminate as if connection is closed. What say? 

No.

It will terminate when it tries to read the next query from the client.

			regards, tom lane

Thu, 19 Sep 2002 11:49:39 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: killing process question 
On 19 Sep 2002 at 11:49, Tom Lane wrote:

> "Shridhar Daithankar" <shridhar_daithankar@persistent.co.in> writes:
> > I guess a backend should terminate as if connection is closed. What say? 
> 
> No.
> 
> It will terminate when it tries to read the next query from the client.

OK. But what if it never reads anything? I mean if the client dies after a 
complete transaction i.e. no input pending for either back end or client, will 
it just sit around waiting for select to signal that fd?(AFAIU, that's how 
things goes in there..)

Clearly we have a case where backend is hung persumably. Either it has to have 
an explanation(OK client did aborted abruptly) and/or a possible corrective 
action..

Just some thoughts..


Bye
 Shridhar

--
QOTD:	"I won't say he's untruthful, but his wife has to call the	dog for 
dinner."


Thu, 19 Sep 2002 21:28:55 +0530
"Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>
Re: killing process question 