April 16, 2014
8:17 p.m.
If you are thinking about an RDBMS like postgresql, why not just use sequences ? http://www.neilconway.org/docs/sequences/ Especially the INSERT ... RETURNING ... ; is useful. On 16 Apr 2014, at 21:52, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Hi,
A few weeks ago Sven was asking for a lock-free in-image atomic counter.
Today I'm in need of implementing a DB backed (PGSQL) counter for business forms numbering, and maybe there are some toughts you're willing to share :)
I can't find any other way than a row lock for each counter, but maybe there is something better (I avoid locks as much as possible).
Any thoughts to share here?
Regards!