We are running cuba application on top of postgresql. By default increment value for sequences are generated as 100. We changed this value to 1 (since we use ID on the screen and jumping by 100 is not good for us). After that change each time we restart application, sequence in database is late from max(id) in the table. So we get pkey violation errors. If we put increment value to 100 back then everything works fine. Another workaround is syncronize max(id) with current value of sequences each time we restart application.
Please, let us know how to fix this issue so we won’t need to sync sequences each time we restart app.
Thanks,