On Thu, Oct 18, 2012 at 11:26 PM, Kevin Grittner <kgrittn@mail.com> wrote:
> updating a "last_used" number in a table and
> using the result (if it is *is* critical that there are no gaps in
> the numbers).
Correct me if I'm wrong, but wouldn't:
update some_table set last_used=last_used+1 returning last_used
simply block until the other transaction is committed/rolled back?
That avoids all the issues of serialization AND retrying transactions.
Or is the delay itself a problem?
ChrisA