Re: killing pg_dump leaves backend process - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: killing pg_dump leaves backend process
Date
Msg-id 5207F347.9040709@agliodbs.com
Whole thread Raw
In response to killing pg_dump leaves backend process  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: killing pg_dump leaves backend process  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On 08/10/2013 04:26 AM, Greg Stark wrote:
> On Sat, Aug 10, 2013 at 5:30 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Any other client would behave the same
>> if it were killed while waiting for some backend query.  So the right
>> fix would involve figuring out a way for the backend to kill itself
>> if the client connection goes away while it's waiting.

I've been waiting forever to have something we can justifiably call the
"loner suicide patch".  ;-)

> I'm surprised this is the first time we're hearing people complain
> about this. I know I've seen similar behaviour from Mysql and thought
> to myself that represented pretty poor behaviour and assumed Postgres
> did better.

No, it's been a chronic issue since we got SMP support, pretty much
forever.  Why do you think we have pg_terminate_backend()?

The problem, as explored downthread, is that there's no clear way to fix
this.  It's a problem which goes pretty far beyond PostgreSQL; you can
experience the same issue on Apache with stuck downloads.

Our advantage over MySQL is that the idle process isn't likely to crash
anything ...

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [PATCH] pg_sleep(interval)
Next
From: Greg Stark
Date:
Subject: Re: killing pg_dump leaves backend process