Optimistic concurrency control

From: "Frank Millman" <frank(at)chagford(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Optimistic concurrency control
Date: 2005-01-13 09:49:00
Message-ID: 000001c4f958$480211f0$0a01a8c0@chagford.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason.Davey 2005-01-13 10:27:11 PostgreSQL v7.3.6
Previous Message Tony Caduto 2005-01-13 06:44:05 Re: Question about pg_stat_activity