Relative Content

Tag Archive for springpostgresqlpostgresql-16

Spring Boot Using Old DB Function Logic

I have a function in my Postgre DB that get’s called by a Spring boot application. Inside the function’s code there is a FOR UPDATE lock on certain rows. Under certain circumstances this lock caused the System to go into starvation (Some transactions are hogging the locks so incoming threads from spring trying to acquire a connection time out). Due to this, I decided to remove the FOR UPDATE lock from the functions code. This was done without shutting down or restarting the application, the expectation was that the code should update on the fly.