I am upgrading from Spring Boot 2.5 to 2.6 and before that the batch insert was working properly using the properties below.

spring.jpa.properties.hibernate.jdbc.batch_size=30
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.batch_versioned_data=true

As soon as upgraded to 2.6 it stopped working and Session Metrics shows 0 nanoseconds spent executing 0 JDBC batches. I tried downgrade to 2.5 again and it worked again 12678305100 nanoseconds spent executing 2947 JDBC batches;.

I checked Hibernate docs and nothing changed with this properties, also there is nothing on 2.6 release notes about any changes.

*Postgres DB

Comment From: mbhave

@zambrinf In order to help us reproduce the issue, please provide a minimal sample that we can run. The sample can be provided as a link to a Github repository or attaching it as a zip to the issue.