Databases
Bug Report
Postgres duplicate key value violates unique constraint pkey after bulk import
After importing 410,000 tickets with their original ids, most new tickets failed with duplicate key value violates unique constraint tickets_pkey, while a few succeeded. The id sequence was still at 1. Here is why, and how we resynced every sequence safely.