Re: Function to kill backend

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <mha(at)sollentuna(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Function to kill backend
Date: 2004-04-06 19:59:50
Message-ID: 1081281589.56361.602.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2004-04-06 at 15:10, Josh Berkus wrote:
> Bruce,
>
> > OK, you have a runaway report. You want to stop it. Query cancel is
> > only going to stop the current query, and once you do that the next
> > query is fed in so there is no way to actually stop the report,
> > especially if the report is not being run from the same machine as the
> > server (you can't kill the report process). How do you stop it without
> > SIGTERM? You don't want to shut down the postmaster.
>
> Hmmm ... but, at least in the case of my apps, killing the PG connection
> wouldn't fix things. Most apps I work on are designed to detect connection
> failure and reconnect. I suspect that most platforms that use connection
> pooling are the same. So your case would only work if you actually blocked
> all connections from that host -- not a capability we'd discussed.

That would be a likely second step (go into pg_hba to block). But you
still have to get rid of the idlers at some point.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-04-06 20:01:52 Re: [HACKERS] logging statement levels
Previous Message Rod Taylor 2004-04-06 19:58:28 Re: Function to kill backend