From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimistic concurrency control |
Date: | 2005-01-13 16:44:22 |
Message-ID: | 20050113174422.B567@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Lonni J Friedman | 2005-01-13 16:55:08 | allowing connections from additional hosts without a restart? |
Previous Message | Alvaro Herrera | 2005-01-13 16:37:56 | Re: Réf. : Re: Réf |