pyPgSQL, threads and Solaris
Jason Ish <[email protected]> Fri, 27 Aug 2004 00:20:57 -0600
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
I'm running into problems using pyPgSQL DB-API interface on Solaris 9
(with up to date patches) from a thread. I get the following
exception on a fetchall():
Exception in thread Thread-1:
Traceback (most recent call last):
File
"/export/home/jason/awsrc/scooby/othersrc/python/../fakeroot/lib/python2.3/threading.py",
line 436, in __bootstrap
self.run()
File
"/export/home/jason/awsrc/scooby/othersrc/python/../fakeroot/lib/python2.3/threading.py",
line 416, in run
self.__target(*self.__args, **self.__kwargs)
File "playpen/test_largequery.pl", line 40, in the_thread
res = c.fetchall()
File
"/export/home/jason/awsrc/scooby/othersrc/fakeroot/lib/python2.3/site-packages/pyPgSQL/PgSQL.py",
line 3267, in fetchall
self.res = self.conn.conn.query('FETCH ALL FROM "%s"' % self.name)
OperationalError: could not receive data from server: Error 0
By using fetchone() I can usually get a few items but end up with a
similar traceback.
pyPgSQL is built against Python 2.3.4 and PostgreSQL 7.3.4. I'm not
really sure if its a problem in pyPgSQL, libpq or in Python threads
support on Solaris but thought I'd start hunting here first.
The same code works fine in Linux, FreeBSD and OpenBSD.
Any ideas? I think my next course of action is to try and reproduce a
similar failure with C/libpq.
Thanks,
Jason
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285