Is there a way to reset the sequence to the maximum number +1? I don't recall seeing this in the postgres docs but will look again.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных