Duplicate key value violates unique constraint "[collection]_pkey"

Thanks for your response here.

The error here really is just related to the next time we try to add a record to the database. Perhaps the issue can be resolved by altering the sequence?

https://www.postgresqltutorial.com/postgresql-sequences/

ALTER SEQUENCE serial RESTART WITH 105;

2 Likes