Should I reset the sequence to MAX(id) or MAX(id)+1 after a data import?
As stated in the title, should I reset a PG sequence to MAX(id) or to MAX(id)+1 after a data import? — is what SELECT MAX(id) FROM my_table or — SELECT MAX(id)+1 FROM my_table ALTER SEQUENCE my_table_id_seq RESTART WITH what; If I pick a table and do SELECT MAX(id) FROM my_table, I get x, then I… Read More Should I reset the sequence to MAX(id) or MAX(id)+1 after a data import?