X-Original-To: pgsql-sql@postgresql.org Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id C3465475A45 for ; Fri, 7 Mar 2003 13:27:04 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h27IQc205082; Fri, 7 Mar 2003 13:26:38 -0500 (EST) From: Bruce Momjian Message-Id: <200303071826.h27IQc205082@candle.pha.pa.us> Subject: Re: Cancelling Queries In-Reply-To: <20030307052705.GA5440@serwer> To: jasiek@klaster.net Date: Fri, 7 Mar 2003 13:26:38 -0500 (EST) Cc: Mark Mitchell , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200303/207 X-Sequence-Number: 12247 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