I am having a scenario where we close the postgres connection unexpectedly that is the jetty server which is using the connection pool. So in our scenario we are killing the jetty server issuing Kill -9 so connection pool is not closed properly , so my question is that will it going to affect the postgres database, can it cause the postgres corruption. Or all the Connections will be closed automatically and the running transactions will be rolled back without affecting the database.
Any transaction that is not committed, will cause an implicit rollback when you disconnect. This will never result in a corrupt database, a rollback never results in a corrupt database.
Using kill -9 is asking for problems, but it won't corrupt your database when you just kill the connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With