If you are receiving the below error for an auto-incremented table: ERROR: duplicate key violates unique constraint it likely means that the table's sequence has somehow become out of sync, likely because of a mass import process (or something along those lines).