Re: [GENERAL] Using xmin and xmax for optimistic locking - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Using xmin and xmax for optimistic locking
Date
Msg-id 11074.1487625771@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Using xmin and xmax for optimistic locking  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: [GENERAL] Using xmin and xmax for optimistic locking  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
Karsten Hilbert <Karsten.Hilbert@gmx.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


pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: [GENERAL] Using xmin and xmax for optimistic locking
Next
From: Karsten Hilbert
Date:
Subject: Re: [GENERAL] Using xmin and xmax for optimistic locking