Comment 1 for bug 960201

You're right, the Postgres-backed sequence implementation does not currently update its "next number", because updating the corresponding "ir.sequence" row with the new next_number value would make it subject to the same limitations and concurrency bottlenecks as the "no_gap" implementation.

We should probably replace the next_number field with a function field that queries the Postgres sequence on-demand if the sequence is of `standard` type, and reads it from the database for "no_gap" ones (also taking care of `update` operations like it is done now).

Any contributed patches are welcome, by the way :-)

Thanks for reporting!