ID: 9273
Updated by: sasha
Status: Open
Bug Type: PostgreSQL related
Assigned To: 

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.

Previous Comments:

[2001-02-15 06:12:37] [EMAIL PROTECTED]
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


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to