Re: connection pooling
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno gio, 19/03/2009 alle 12.31 -0600, David ha scritto: > What specific benefit does an within-process connection pool provide > to a system? > > Psycopg2 is threadsafe to the cursor level, (threadsafety=2) so a > process can create a global connection that is shared by all threads; > each thread can get a new cursor for its own purposes, and all threads > in the process can benefit from one persistant connection. That would > seem to provide all the benefits of connection pooling, without the > overhead of checking connections into and out-of a pool. Sometimes you want one thread to commit while another has still some work to do... -- Federico Di Gregorio http://people.initd.org/fog Debian GNU/Linux Developer [email protected] INIT.D Developer fog-NGVKUo/i/[email protected] Stavo parlando di fica, non di fisica -- Stupido show in TV _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAknCnbMACgkQvcCgrgZGjescQQCbBwh7ipv5xY1ATFysZSKbW/EO vwgAoJBmVkikvfMxv8WU/w0eA9NRg+GC =7xtI -----END PGP SIGNATURE-----