top | item 34176752

(no title)

janus | 3 years ago

This is great, except for the additional query each time a record is instantiated in the rails concern. That might cause some performance problems in high traffic.

Perhaps it’d be better to attempt the insertion and change the id only if there’s a colission detected with a uniqueness constraint

discuss

order

FrancoisBosun|3 years ago

In PostgreSQL, if a DB exception is raised (unique_violation), the whole transaction will abort: there is no way to retry.