On Mon, August 13, 2007 15:55, [EMAIL PROTECTED] wrote: >>One problem is, all this asynchronous stuff requires locking. We don't >> do >>that right now, and it's a pretty big step to take. > > I think that the cancellation methods could be added to pqxx without > implementing locking. One of my biggest concerns in implementing > request cancellation in pqxx was how to implement the tests.
I can imagine, yes. It's not perfect, but perhaps the pg_sleep() function could help here. One thread can do a "select pg_sleep(60)" while another can wait 5 seconds (or whatever you feel is long enough that it won't fail just because the test system happens to be busy) and then cancel the query. > I am preparing to replace all of our home-brew database objects' > implementations with libpqxx. The program is multi-threaded so we > already handle locking issues in other ways at higher-levels. That's the general policy for libpqxx at the moment anyway, so whoever follows that should be okay. > Statement cancellation is the only thing we need that's missing in pqxx. Thanks for working on this! Jeroen _______________________________________________ Libpqxx-general mailing list Libpqxx-general@gborg.postgresql.org http://gborg.postgresql.org/mailman/listinfo/libpqxx-general