Lance wrote in post #93083:
There is a method in the Postgresql adapter called reset_pk_sequence. I
haven't used it yet but it sounds like this is what you are looking for.
I used it:
but, it didn't work. The next Account.save had the :id = last :id + 1
At least it didn't crash
I'm still looking for a solution.