pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Cancelling Queries
5+ messages / 3 participants
[nested] [flat]
* Re: Cancelling Queries
@ 2003-03-06 14:31 Mark Mitchell <mark@lapcrew.com>
parent: jasiek@klaster.net
1 sibling, 1 reply; 5+ messages in thread
From: Mark Mitchell @ 2003-03-06 14:31 UTC (permalink / raw)
To: jasiek@klaster.net; pgsql-sql
These are select queries that may have been keyed incorrectly that I
need to cancel. So a transaction won't help in this case.
- Mark
jasiek@klaster.net wrote:
>On Thu, Mar 06, 2003 at 06:25:29PM -0500, Mark Mitchell wrote:
>
>
>>I have a Perl program that executes PostgreSQL queries through DBI.
>>Is there any way to cancel a query once its started. If I could at least
>>somehow get the PID of the child process postmaster starts I could kill
>>that.
>>
>>This may be a better question for the Perl programming list but I
>>thought I'd ask you guys too
>>
>>Mark Mitchell
>>
>>
>Use transactions.
>Just before query finish you can confirm query (commit) or cancel it
>(rollback)
>
>Regards,
>Tomasz Myrta
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>
--
Mark Mitchell
www.lapcrew.com
Registered Linux User # 299662
Mandrake 8.0 , RedHat 8.0
^ permalink raw reply [nested|flat] 5+ messages in thread
* Cancelling Queries
@ 2003-03-06 23:25 Mark Mitchell <mark@lapcrew.com>
0 siblings, 1 reply; 5+ messages in thread
From: Mark Mitchell @ 2003-03-06 23:25 UTC (permalink / raw)
To: pgsql-sql
I have a Perl program that executes PostgreSQL queries through DBI.
Is there any way to cancel a query once its started. If I could at least
somehow get the PID of the child process postmaster starts I could kill
that.
This may be a better question for the Perl programming list but I
thought I'd ask you guys too
Mark Mitchell
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Cancelling Queries
@ 2003-03-07 05:27 jasiek@klaster.net
parent: Mark Mitchell <mark@lapcrew.com>
0 siblings, 2 replies; 5+ messages in thread
From: jasiek@klaster.net @ 2003-03-07 05:27 UTC (permalink / raw)
To: Mark Mitchell <mark@lapcrew.com>; +Cc: pgsql-sql
On Thu, Mar 06, 2003 at 06:25:29PM -0500, Mark Mitchell wrote:
> I have a Perl program that executes PostgreSQL queries through DBI.
> Is there any way to cancel a query once its started. If I could at least
> somehow get the PID of the child process postmaster starts I could kill
> that.
>
> This may be a better question for the Perl programming list but I
> thought I'd ask you guys too
>
> Mark Mitchell
Use transactions.
Just before query finish you can confirm query (commit) or cancel it
(rollback)
Regards,
Tomasz Myrta
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Cancelling Queries
@ 2003-03-07 18:26 Bruce Momjian <pgman@candle.pha.pa.us>
parent: jasiek@klaster.net
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Momjian @ 2003-03-07 18:26 UTC (permalink / raw)
To: jasiek@klaster.net; +Cc: Mark Mitchell <mark@lapcrew.com>; pgsql-sql
Libpq has PQrequestCancel() which does cancels, but I don't see it in
DBD. Maybe someone can make a patch. ;-)
---------------------------------------------------------------------------
jasiek@klaster.net wrote:
> On Thu, Mar 06, 2003 at 06:25:29PM -0500, Mark Mitchell wrote:
> > I have a Perl program that executes PostgreSQL queries through DBI.
> > Is there any way to cancel a query once its started. If I could at least
> > somehow get the PID of the child process postmaster starts I could kill
> > that.
> >
> > This may be a better question for the Perl programming list but I
> > thought I'd ask you guys too
> >
> > Mark Mitchell
> Use transactions.
> Just before query finish you can confirm query (commit) or cancel it
> (rollback)
>
> Regards,
> Tomasz Myrta
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Cancelling Queries
@ 2003-03-08 22:27 jasiek@klaster.net
parent: Mark Mitchell <mark@lapcrew.com>
0 siblings, 0 replies; 5+ messages in thread
From: jasiek@klaster.net @ 2003-03-08 22:27 UTC (permalink / raw)
To: Mark Mitchell <mark@lapcrew.com>; +Cc: pgsql-sql
On Thu, Mar 06, 2003 at 08:31:56AM -0600, Mark Mitchell wrote:
> These are select queries that may have been keyed incorrectly that I
> need to cancel. So a transaction won't help in this case.
What about setting maximum query execution time in postgresql
configuration? There are some options helpful for deadlock cases.
Regards,
Tomasz Myrta
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-03-08 22:27 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06 23:25 Cancelling Queries Mark Mitchell <mark@lapcrew.com>
2003-03-07 05:27 ` jasiek@klaster.net
2003-03-06 14:31 ` Mark Mitchell <mark@lapcrew.com>
2003-03-08 22:27 ` jasiek@klaster.net
2003-03-07 18:26 ` Bruce Momjian <pgman@candle.pha.pa.us>
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