pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedQuit currently running query
6+ messages / 5 participants
[nested] [flat]
* Quit currently running query
@ 2023-02-28 10:53 Albert Cornelius <albert1.cornelius@gmail.com>
2023-02-28 13:41 ` Re: Quit currently running query Ian Lawrence Barwick <barwick@gmail.com>
2023-02-28 13:42 ` Re: Quit currently running query Ron <ronljohnsonjr@gmail.com>
2023-02-28 15:38 ` Re: Quit currently running query Rob Sargent <robjsargent@gmail.com>
0 siblings, 3 replies; 6+ messages in thread
From: Albert Cornelius @ 2023-02-28 10:53 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Quit currently running query
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
@ 2023-02-28 13:41 ` Ian Lawrence Barwick <barwick@gmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Ian Lawrence Barwick @ 2023-02-28 13:41 UTC (permalink / raw)
To: Albert Cornelius <albert1.cornelius@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
2023年2月28日(火) 22:30 Albert Cornelius <albert1.cornelius@gmail.com>:
>
> 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?
See here:
https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL
Regards
Ian Barwick
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Quit currently running query
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
@ 2023-02-28 13:42 ` Ron <ronljohnsonjr@gmail.com>
2023-02-28 17:31 ` Re: Quit currently running query Peter J. Holzer <hjp-pgsql@hjp.at>
2 siblings, 1 reply; 6+ messages in thread
From: Ron @ 2023-02-28 13:42 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Quit currently running query
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
2023-02-28 13:42 ` Re: Quit currently running query Ron <ronljohnsonjr@gmail.com>
@ 2023-02-28 17:31 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2023-02-28 18:22 ` Re: Quit currently running query Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Peter J. Holzer @ 2023-02-28 17:31 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2023-02-28 07:42:08 -0600, Ron wrote:
> 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".
The term "server" can mean different things:
1) A role in an interaction between two programs. The "client" is the one
which issues requests, and the "server" is the one which fullfills
them.
2) A program which is intended for the server role. Note that a program
can be a server for one protocol and a client for another (e.g., a
database server can be a DNS or LDAP client). (And some programs are
even server and client for the same protocol)
3) A machine intended for running server programs.
You are thinking of the 3rd meaning. My guess is that Albert meant the
first.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Quit currently running query
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
2023-02-28 13:42 ` Re: Quit currently running query Ron <ronljohnsonjr@gmail.com>
2023-02-28 17:31 ` Re: Quit currently running query Peter J. Holzer <hjp-pgsql@hjp.at>
@ 2023-02-28 18:22 ` Ron <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Ron @ 2023-02-28 18:22 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2/28/23 11:31, Peter J. Holzer wrote:
> On 2023-02-28 07:42:08 -0600, Ron wrote:
>> 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".
> The term "server" can mean different things:
>
> 1) A role in an interaction between two programs. The "client" is the one
> which issues requests, and the "server" is the one which fullfills
> them.
>
> 2) A program which is intended for the server role. Note that a program
> can be a server for one protocol and a client for another (e.g., a
> database server can be a DNS or LDAP client). (And some programs are
> even server and client for the same protocol)
>
> 3) A machine intended for running server programs.
>
> You are thinking of the 3rd meaning. My guess is that Albert meant the
> first.
And maybe he's referring to his client software... That's why I asked him
for clarification.
--
Born in Arizona, moved to Babylonia.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Quit currently running query
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
@ 2023-02-28 15:38 ` Rob Sargent <robjsargent@gmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Rob Sargent @ 2023-02-28 15:38 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2/28/23 03: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?
can you open another psql session to your server?
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-02-28 18:22 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 10:53 Quit currently running query Albert Cornelius <albert1.cornelius@gmail.com>
2023-02-28 13:41 ` Ian Lawrence Barwick <barwick@gmail.com>
2023-02-28 13:42 ` Ron <ronljohnsonjr@gmail.com>
2023-02-28 17:31 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2023-02-28 18:22 ` Ron <ronljohnsonjr@gmail.com>
2023-02-28 15:38 ` Rob Sargent <robjsargent@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox