Re: Can I interrupt queries already processing in the server?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Laura Arbilla <larbilla(at)deepfile(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can I interrupt queries already processing in the server?
Date: 2004-06-29 21:36:11
Message-ID: 20040629213606.GA26381@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try looking at PQrequestCancel, though you may need to be in
non-blocking mode for it to work.

On Tue, Jun 22, 2004 at 02:05:32PM -0700, Laura Arbilla wrote:
> We are running Postgres 7.3 on a Debian Linux system.
> Our python web application uses psycopg to talk to the Postgres server.
>
> Our problem is that our queries can be on millions of records of data
> and take a long time. At times, the user (of the web app) loses
> interest in waiting for the results. I can have the web app move on,
> but the postmaster process which is taking care of the request stays
> around until it completes. When we have several impatient users,
> then the number of server processes left running makes the whole
> system's performance degrade considerably.
>
> I'd like to have the ability to "interrupt" that server process and
> have it complete/abort.
>
> Is there any plan to support this functionality in a future release?
> If not, where should I submit the request?
>
> Thank you!
>
> Laura Arbilla
> Deepfile Corporation
> larbilla(at)deepfile(dot)com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-06-29 21:37:48 Re: Connection gets into state where all queries fail
Previous Message Simon Windsor 2004-06-29 21:30:51 Postgres tuning?