psycopg concurrency control - Mailing list psycopg

From John Lb
Subject psycopg concurrency control
Date
Msg-id CANqFGQx9Qgoe-1F5iEE8myrR_gECapPN23BzwCSrhZs8RiAfAA@mail.gmail.com
Whole thread Raw
Responses Re: psycopg concurrency control  (Christophe Pettus <xof@thebuild.com>)
List psycopg

I am working on a project using psycopg2 together with python 2.7 where I have one writer to a DB table  and  multiple readers from the same table.  On python I am using the TCP socketserver  with the ThreadingMixin where each thread create their own connection and cursor  ,  read the data  and then  commit  and close.  This is working fine.

Right now I have a situation where  I can  have multiple writers to the same table  and there is a chance for  concurrency issues .

I am not a  Postgres guy  but  I tried to  read the  documentation and  I  believe that   Explicit Locking -->  Table level Locks -->  ROW EXCLUSIVE  are the way to go .

Can  someone give me some guidance on the concurrency control and  important   also  how  I can  translate this  into   python psycopg code ??

Many thanks

psycopg by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: 2.6.2 import error
Next
From: Christophe Pettus
Date:
Subject: Re: psycopg concurrency control