Re: Error during "SELECT" using psycopg 2.0.2

Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Organization initd.org
Message-ID <[email protected]>
Il giorno ven, 15/02/2008 alle 12.10 -0700, Nathan ha scritto:
> I've got a python script (python 2.4.2 on 32-bit linux) that uses
> python threads and psycopg (2.0.2) to connect to postgres (8.2.3).
> The threads each do a bunch of selects, inserts, updates, and deletes,
> and I've started intermittently having crashes with the following
> error:
> 
> Exception in thread Thread-45:
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
>     self.run()
> [snip]
> OperationalError: ERROR:  SET TRANSACTION ISOLATION LEVEL must be
> called before any query

Are you using one connection per thread? Also, before going on make sure
to use an up to date psycopg, like 2.0.6.

federico

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                [email protected]
INIT.D Developer                                           fog-NGVKUo/i/[email protected]
 I porcellini di terra sono davvero Crostacei! Non lo sapevo!
  Certo che sono crostacei, hanno la crosta!
  Allora la pizza è un crostaceo?!               -- discorso all'ESC2k07

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBHtxabvcCgrgZGjesRAhP1AJ90gswXwFXvuFwhrSFMYtU8Apmc0wCdGN50
4Hl/t3Ru6Zqeummn/tRu9RM=
=psx6
-----END PGP SIGNATURE-----
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.