Another psycopg crash: "ERROR: could not serialize access due to concurrent update"

Nathan <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Here's another problem I'm facing, though this one is less
reproducible.  This sometimes occurs, and sometimes doesn't, which is
odd--especially since I'm not doing anything fancy like threads--just
straightforward loops.  I don't think this is 2.0.10-specific, since
it occasionally happened with earlier versions, but the frequency of
the crash has increased enormously (from about 2% of the time to
50-60% of the time) when I upgraded from 2.0.8 to 2.0.10.

Does the info I included below ring a bell for anyone?

My Setup:

Python 2.4.4 (#1, Jul 31 2008, 18:35:49)
[GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2
libpq on client machine: 8.1.11
postgresql/libpq on db server: 8.2.3

The Error That Doesn't Always Occur:

Traceback (most recent call last):
 File "/sm/merch_queue.py", line 211, in ?
   {'merchantid':merchantid, 'merchemailset_id':merchemailset_id})
psycopg.ProgrammingError: ERROR:  could not serialize access due to
concurrent update
CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."prospects" x
WHERE "merchantid" = $1 FOR SHARE OF x"

insert into merch_queue (merchantid, emailnum, merchemailset_id)
                 values ('787595203495998', 2, 72);
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.