Optimistic concurrency control - Mailing list pgsql-general

From Frank Millman
Subject Optimistic concurrency control
Date
Msg-id 000001c4f958$480211f0$0a01a8c0@chagford.com
Whole thread Raw
Responses Re: Optimistic concurrency control
Re: Optimistic concurrency control
Re: Optimistic concurrency control
List pgsql-general
Hi all
 
I have been reading up on 'optimistic concurrency control'.
 
The following quote is taken from the on-line help for MS SQL Server 2000 -
 
"Optimistic concurrency control works on the assumption that resource conflicts between multiple users are unlikely (but not impossible), and allows transactions to execute without locking any resources. Only when attempting to change data are resources checked to determine if any conflicts have occurred. If a conflict occurs, the application must read the data and attempt the change again."
 
MS SQL Server uses a 'timestamp' column to check if a row has been altered since it was read. The equivalent in PostgreSQL seems to be the system column 'xmin'. However, the notes say 'You do not really need to be concerned about these columns, just know they exist.' Is it ok to use xmin for this purpose, or is there another way of achieving OCC?
 
TIA
 
Frank Millman

pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Re: Question about pg_stat_activity
Next
From: Peter Childs
Date:
Subject: Re: problems with 8.0 Rc4