X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 5CCD59DC876 for ; Tue, 28 Feb 2006 14:26:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81657-08 for ; Tue, 28 Feb 2006 14:26:09 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 718269DC823 for ; Tue, 28 Feb 2006 14:26:07 -0400 (AST) Received: from bercut.donpac.ru (bercut.donpac.ru [80.254.111.197]) by svr4.postgresql.org (Postfix) with ESMTP id 117455AF0BB for ; Tue, 28 Feb 2006 18:26:05 +0000 (GMT) Received: from [192.168.47.2] (unknown [192.168.47.2]) by bercut.donpac.ru (Postfix) with ESMTP id 35470406B for ; Tue, 28 Feb 2006 21:25:58 +0300 (MSK) Message-ID: <44049611.8050300@stc.donpac.ru> Date: Tue, 28 Feb 2006 21:27:29 +0300 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Python psycopg transaction isolation level Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.197 required=5 tests=[AWL=2.197] X-Spam-Score: 2.197 X-Spam-Level: ** X-Archive-Number: 200602/88 X-Sequence-Number: 6052 Hi, I have a simple python script: connection = psycopg.connect("host="+server+" dbname="+database+" user="+login+" password="+password) cursor_modify = connection.cursor() cursor_modify.execute("update messages set flag=1 where flag=0") connection.commit() On running it sometimes I got: psycopg.ProgrammingError: ERROR: could not serialize access due to concurrent update How can I setup isolation level for waiting end of executing other transaction and execute update without any error? -- Thanks, Eugene Prokopiev