When you can't afford to guess the right batch size and don't want to pay for that lesson in production
When I designed the persistence layer of a real-time interbank settlement pipeline, I had a problem that many financial systems share: I didn't have a precise estimate of daily order volume. Some days would be normal. Others would be outliers and in a settlement system, outlier days are not a hypothesis. They are a certainty.
The question wasn't whether the system could handle average load. It was whether it could handle the days it wasn't designed for.
That question led me away from JDBC batch inserts and toward PostgreSQL's COPY protocol, exposed in Spring Boot via the CopyManager API.
Why Not JDBC Batch?






