From: | John Lb <johnlb77(at)gmail(dot)com> |
---|---|
To: | psycopg(at)postgresql(dot)org |
Subject: | psycopg concurrency control |
Date: | 2016-09-11 15:26:25 |
Message-ID: | CANqFGQx9Qgoe-1F5iEE8myrR_gECapPN23BzwCSrhZs8RiAfAA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Christophe Pettus | 2016-09-11 23:47:25 | Re: psycopg concurrency control |
Previous Message | Devrim Gündüz | 2016-09-02 14:47:49 | Re: 2.6.2 import error |