validation query(SELECT 1) alway execute
Bug Report
The issue is that validation query (SELECT 1) is triggerred at regular intervals when the application is started and these connection remains in idle status forever.
Versions
- Driver:1.0.1
- Database:pgsql
- Java:17
- OS:mac
Pool config defaults to local validation (i.e. whether the connection is connected to a server). Remote validation (ConnectionPoolConfiguration.Builder#validationDepth(REMOTE)) enables SELECT 1 validation queries.
Not quite sure what you're asking for. If you're seeing issues with connection starvation, you might want to update to Pool 1.0.2 and the latest Postgres driver.
I think this check (select 1) is used to determine whether the thread is alive, rather than executing it (sql) every time before executing the statement.I think we should start a scheduled daemon thread to perform this check (select 1)