Re: psycopg concurrency control - Mailing list psycopg

From Christophe Pettus
Subject Re: psycopg concurrency control
Date
Msg-id 4029325C-9C03-4E1A-A856-9D58C5C7CBFD@thebuild.com
Whole thread Raw
In response to psycopg concurrency control  (John Lb <johnlb77@gmail.com>)
Responses Re: psycopg concurrency control  (John Lb <johnlb77@gmail.com>)
List psycopg
On Sep 11, 2016, at 8:26 AM, John Lb <johnlb77@gmail.com> wrote:
> I am not a  Postgres guy  but  I tried to  read the  documentation and  I  believe that   Explicit Locking -->  Table
levelLocks -->  ROW EXCLUSIVE  are the way to go . 

You almost certainly *don't* have to do any explicit locking, even with writers to the same table; PostgreSQL will
largelyhandle the concurrency issues for you.  Note that once a particular connection has written to an (existing) row,
noother session can write to that same row until the first session commits or aborts; the second session will wait for
thefirst transaction to finish. 

--
-- Christophe Pettus
   xof@thebuild.com



psycopg by date:

Previous
From: John Lb
Date:
Subject: psycopg concurrency control
Next
From: Christophe Pettus
Date:
Subject: Re: psycopg concurrency control