Upgrading to 5.4 and all my @SequenceGenerator started failing.
Workaround is to override the default of 50, but I didn't see this change documented.
Using postgres-10, with sequences created via serial and bigserial types.
If your sequence optimizer is HiLo, then there is a known bug as reported here:
Otherwise, you might share the same issue with . Not sure whether it is a bug or a feature, though.