Hello sasha,

actually I added pg_cancel to the postgres tcl interface in order to support async
processing. The main reason I wanted that was to keep some responsiveness of the gui
during database transactions. It turned out to be fairly easy in this case because
postgres already processes the transaction asynchronously and it is just the client
that is sitting in a loop. On the other side of the coin, there is not too much the 
script
can do while it is waiting for results, so async processing might be pointless if the
script does not have a gui.
Once in place, I tried pg_cancel by itself on the webserver in a tcl environment, and 
it
works fine as a signal handler, so when the webserver times out, it sends a SIGTERM, 
and
the script in turn sends a CANCEL to the database. It could probably be done in the 
same
way if the internal timeout (or the signal from the webserver) just calls the 
pg_cancel().
Can a registered shutdown function do that if the script does not try to catch the 
event
by itselt?

Wolfgang Hamann




-- 
PHP Development Mailing List <http://www.php.net/>
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