I noticed wrong return of ids when inserting venues into a postgres database.
The identity SQL is off by one in my case. Specifically the select lastval() as id is causing the issue. Somehow lastval has gone out of sync in my development environment as well as the production environment. The cause is unknown.
Switching the lastval() strategy out with "returning id" resolves the issue and returns the correct value. Is there a reason this strategy is not preferred?