Thread: orphaned runaway queries after killing pgadmin

orphaned runaway queries after killing pgadmin

From
"Dan Halbert"
Date:
<font face="arial" size="2"><p>Today I end up killing pgadmin a few times while inadvertantly running some huge queries
andsome ALTER requests that were blocked due to the queries. I should have canceled the queries from pgadmin, but I
didn't.When I saw that the postgres processes were using up 100% of the CPU, I looked up the process id's of the ALTERs
andrunaway queries in pg_stat_activity and did the equivalent of "pg_ctl kill".<p> <p>I don't think this is really
pgadmin'sfault, but why doesn't PostgreSQL notice that the query requestor has vanished and quit working on the query?
Apologiesif you think I should ask this on a general PG list.<p> <p>Thanks,<p>Dan</font> 

Re: orphaned runaway queries after killing pgadmin

From
Guillaume Lelarge
Date:
Le 15/11/2010 21:10, Dan Halbert a écrit :
> Today I end up killing pgadmin a few times while inadvertantly
> running some huge queries and some ALTER requests that were blocked
> due to the queries. I should have canceled the queries from pgadmin,
> but I didn't. When I saw that the postgres processes were using up
> 100% of the CPU, I looked up the process id's of the ALTERs and
> runaway queries in pg_stat_activity and did the equivalent of "pg_ctl
> kill".
> 
> I don't think this is really pgadmin's fault, but why doesn't
> PostgreSQL notice that the query requestor has vanished and quit
> working on the query? Apologies if you think I should ask this on a
> general PG list.
> 

You're right that it's not pgAdmin's fault. Question is: how could
PostgreSQL know the client is killed? I don't have the answer unfortunately.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com