pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow can I stop a long run pgAgent job?
3+ messages / 3 participants
[nested] [flat]
* How can I stop a long run pgAgent job?
@ 2018-06-21 09:32 a <372660931@qq.com>
0 siblings, 1 reply; 3+ messages in thread
From: a @ 2018-06-21 09:32 UTC (permalink / raw)
To: pgsql-general
Hi
I'm using pgAdmin 4, pgAgent and postgresql 10 on windows server.
I tried a job but due to some reasons, its running long time. Is there a way that I can terminate it ??
Thanks
Shore
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How can I stop a long run pgAgent job?
@ 2018-06-21 09:36 Fabio Pardi <f.pardi@portavita.eu>
parent: a <372660931@qq.com>
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Pardi @ 2018-06-21 09:36 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi Shore,
Have a look at:
https://www.postgresql.org/docs/current/static/functions-admin.html
'pg_terminate_backend' is probably what you are looking for
regards,
fabio pardi
On 21/06/18 11:32, a wrote:
> HiĀ
>
> I'm using pgAdmin 4, pgAgent and postgresql 10 on windows server.
>
> I tried a job but due to some reasons, its running long time. Is there a way that I can terminate it ??
>
> Thanks
>
> Shore
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How can I stop a long run pgAgent job?
@ 2018-06-21 14:05 Adam Brusselback <adambrusselback@gmail.com>
parent: Fabio Pardi <f.pardi@portavita.eu>
0 siblings, 0 replies; 3+ messages in thread
From: Adam Brusselback @ 2018-06-21 14:05 UTC (permalink / raw)
To: f.pardi@portavita.eu; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>
As said, terminating a backend is the current way to kill a job.
An alternative if this is something you do often:
https://github.com/GoSimpleLLC/jpgAgent
jpgAgent supports terminating a job by issuing a NOTIFY command on the
correct channel like this: NOTIFY jpgagent_kill_job, 'job_id_here';
It works well with windows, and all the existing pgAgent admin tools work
to manage it, it's just a drop in replacement for the agent portion.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-06-21 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21 09:32 How can I stop a long run pgAgent job? a <372660931@qq.com>
2018-06-21 09:36 ` Fabio Pardi <f.pardi@portavita.eu>
2018-06-21 14:05 ` Adam Brusselback <adambrusselback@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