Re: Using xmin and xmax for optimistic locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using xmin and xmax for optimistic locking
Date: 2017-02-20 21:22:51
Message-ID: 11074.1487625771@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> writes:
> Also a consideration: table.*::text may become quite unwieldy
> if there's one or more BYTEA columns in the table.

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2017-02-20 21:38:04 Re: Using xmin and xmax for optimistic locking
Previous Message Karsten Hilbert 2017-02-20 20:56:51 Re: Using xmin and xmax for optimistic locking