Re: Quit currently running query - Mailing list pgsql-general

From Ron
Subject Re: Quit currently running query
Date
Msg-id c85d3f88-96db-c4cb-f2a9-33ee4cc71266@gmail.com
Whole thread Raw
In response to Quit currently running query  (Albert Cornelius <albert1.cornelius@gmail.com>)
Responses Re: Quit currently running query  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
On 2/28/23 04:53, Albert Cornelius wrote:
How can I quit a currently running query? I've issued a query and my server does not respond anymore. Is there another solution than using kill -9?

What specifically do you mean by "my server does not respond anymore"?  Because if "the server" really doesn't respond anymore, you can't even issue "kill -9".

I'd first try "select pg_cancel_backend(<pid>);".  If that doesn't work, try "select pg_terminate_backend(<pid>);", which is the Postgresql-aproved version of "kill -9".

--
Born in Arizona, moved to Babylonia.

pgsql-general by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re: Quit currently running query
Next
From: celati Laurent
Date:
Subject: Move all elements toward another schema?