DBD::Pg Implementation for cancel()?

[email protected] ("Eric Simon")
Newsgroups perl.dbi.users
Message-ID <B01FB9EEFADF46668457C06BB8C0C6C5@Masterchief>
Hi,

We're using Postgres, and we utilize a sessions table in our web app that
requires us to do a 'SELECT FOR UPDATE', which means that a second process
could block if it also calls 'SELECT FOR UPDATE'.  In order to armor against
users clogging up the system, we need to be able to call $sth->cancel() if
Postgres can't respond within 30 seconds.

However, cancel() is not implemented in DBD::Pg.  I tried working around
this by using the available asynchronous query mechanism and
$sth->pg_cancel(), but it had some destabilizing effects (and I did ensure
that I called rollback() after pg_cancel())...sorry for the vagueness here).
Since we don't need asynchronous code if cancel() was implemented, then I'm
hoping to avoid it as it just creates more probability for error.

Is there any plan to implement cancel()?  If not, would it be a difficult
endeavor for an average C programmer to tackle?

-- 
Eric Simon
The IQ Group, Inc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.