Re: (long) improving async support in psycopg
Daniele Varrazzo <[email protected]> Wed, 24 Mar 2010 10:46:56 +0000
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 24, 2010 at 3:38 AM, Jan Urbański <[email protected]> wrote: > On 23/03/10 01:38, Jan Urbański wrote: > I won't bother you with the details of how an async connection building > procedure could look like, I just want to raise one last issue. The > connection class issues a couple of queries, like SHOW client_encoding or > SHOW default_transaction_isolation. These are issues synchronously and there > is no control over them. That would even be OK, hopefully an application > would not create and close lots of connection during it's lifetime. The bad > thing is the BEGIN query that gets issued synchronously and even less > convenient is that COMMITs are synchronous, and these could take some time > on systems with a certain configuration. I was wondering if it wouldn't be better to have "async" as a connection characteristic (a `psycopg2.connect()` parameter) instead of as a parameter of the single query executions. This way the driver could performed these steps in asynchronous fashion too. Also the issues arising by mixing up sync/async operation would disappear. _______________________________________________ Psycopg mailing list [email protected] http://lists.initd.org/mailman/listinfo/psycopg