Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL state [0A000] keeps recurring, seems unrecoverable #1003

Closed
martijnhaex opened this issue Oct 20, 2017 · 2 comments
Closed

SQL state [0A000] keeps recurring, seems unrecoverable #1003

martijnhaex opened this issue Oct 20, 2017 · 2 comments

Comments

@martijnhaex
Copy link

Environment

HikariCP version: x.x.x
JDK version     : 1.8.0_144
Database        : PostgreSQL
Driver version  : 9.4.1212.jre7

When doing a rolling deploy of our application (over multiple application nodes).
The first node to be redeployed with the new version will apply database changes through Flyway.

Exception: SQL state [0A000]; error code [0]; ERROR: cached plan must not change result type; nested exception is org.postgresql.util.PSQLException: ERROR: cached plan must not change result type.

PostgreSQL errorcode 0A000 (FEATURE NOT SUPPORTED)
This seems to be an unrecoverable exception.
But isn't listed in the SQL_ERRORS list (ProxyConnection) so the connection will not be closed.
So the exception keeps recurring.

@brettwooldridge
Copy link
Owner

In your opinion, evicting the connection upon receipt of 0A000 would allow the application to continue?

@martijnhaex
Copy link
Author

Indeed.

Tried this locally. I placed a custom implementation of ProxyConnection on the classpath to override the default ProxyConnection implementation. Upon receiving the 0A000 errorcode the connection will be closed.
If this doesn't happen then the connection stays in the pool in a corrupted state, because the cached plan is saved per connection. Seems to me that the connection is then corrupt or the cached plan should be removed from that connection upon receiving this errorcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants