rss
08/08/2023, 8:21 AMPSQLException: ERROR: could not serialize access due to concurrent update for LockModeType.PESSIMISTIC_WRITE
I have spring-data-jpa application with postgreSQL database. I get some entity from the database, change it according to the business logic, save the entity back to the database. But periodically, when several requests for calling this functionality come in at the same time, I get this error:
org.postgresql.util.PSQLException: ERROR: could not serialize access due to concurrent update
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
at...