Engineering With Java

Engineering With Java

Spring Data JPA Interview Question: Production Outage Due to ID Generation

Design, code example, concepts and more.

Suraj Mishra's avatar
Suraj Mishra
Feb 09, 2026
∙ Paid

Background

A Spring Boot + PostgreSQL fintech application has been running for years.

User IDs are generated using a database sequence:

After a marketing campaign, new registrations fail with:

ERROR: integer out of range

What exactly went wrong? What will be your initial investigation steps?

PostgreSQL sequences are always BIGINT, so the sequence did not run …

User's avatar

Continue reading this post for free, courtesy of Suraj Mishra.

Or purchase a paid subscription.
© 2026 Suraj Mishra · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture