Re: [GENERAL] Using xmin and xmax for optimistic locking

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: [GENERAL] Using xmin and xmax for optimistic locking
Дата
Msg-id 20170220213804.jny7qdparhz5nd6p@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: [GENERAL] Using xmin and xmax for optimistic locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Feb 20, 2017 at 04:22:51PM -0500, Tom Lane wrote:

> One other thought here --- if you do want to go with the "no other
> updates" semantics, it still seems like it should be sufficient to
> compare xmins.  Comparing the xmax values would add nothing to that,
> except that it would reject if another update had been attempted and
> then failed, which seems undesirable.

Right, we have been doing that (xmin only) in GNUmed for
years in order to detect concurrent updates to our medical
record. Works like a charm.

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Using xmin and xmax for optimistic locking
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Multiply ON CONFLICT ON CONSTRAINT