Search Postgresql Archives

Re: Optimistic concurrency control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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,
It is. If you only need opportunistic locking within one
transaction you can simply rely on PG in serializable mode to
detect conflicts. However, if for various reasons you need to
detect data changes across transactions (eg. across
connections) then you need to use xmin. We do that in GnuMed
(http://www.gnumed.org) and it works nicely.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux