Bug #9273 Updated: feature request: pg_cancel()
| From: | yohgaki@php.net | Date: | Mon, 07 Jan 2002 11:32:13 +0000 |
| Subject: | Bug #9273 Updated: feature request: pg_cancel() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-76158@lists.php.net to get a copy of this message | ||
ID: 9273
Updated by: yohgaki
Reported By: hamann.w@t-online.de
Old Status: Assigned
Status: Closed
Bug Type: PostgreSQL related
Operating System: Linux
PHP Version: 4.0.4pl1
Assigned To: yohgaki
New Comment:
Implemented in 4.2.0-dev
Previous Comments:
------------------------------------------------------------------------
[2001-12-05 19:10:20] yohgaki@php.net
Status => Assigned
------------------------------------------------------------------------
[2001-12-05 18:39:40] yohgaki@php.net
Assigned to myself. (Patch is there, but it need to discuss design is
good enough or not) Sasha, if you have been done some coding? Could you
send me a patch?
------------------------------------------------------------------------
[2001-03-07 08:49:06] sasha@php.net
Good point, but the implementation is not so
straightforward. Note that the registered shutdown function
is called the next time your script tries to output some
data. By that time the blocking pg_exec function will return
and that means that your backend process have terminated.
Actually we need not only the pg_cancel function, but
support for asynchronous query processing... I will see how
such a bunch of functions can be implemented.
------------------------------------------------------------------------
[2001-02-15 06:12:37] hamann.w@t-online.de
Feature request: add pg_cancel() function
Background: although a database search script tries to
avoid "unwanted" queries, sometimes users manage to
do searches that will take considerable time, then press STOP
in their browser. With postgresql this means that the requesting
cgi process is stopped, but the actual database process
continues to run. If this happens a few times (same user requesting
slightly different data), there will be a couple of useless
processes hogging the database server.
Obvious solution (tested on tcl based cgi script) is to
use pg_cancel(), probably with a register_shutdown_function
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=9273&edit=1