The Java JDBC Connection class allows setting a parameter called readOnly, but what is it used for?
According to JDBC documentation:
readOnly is used to put the connection in read-only mode
According to HikariCP documentation:
This property controls whether Connections obtained from the pool are in read-only mode by default. Note some databases do not support the concept of read-only mode, while others provide query optimizations when the Connection is set to read-only. Whether you need this property or not will depend largely on your application and database. Default: false
But what is a connection in read-only mode? What is the concept? A connection that allows SELECT statements only?
Does a read-only connection provide any benefits with PostgreSQL JDBC driver?