-
Notifications
You must be signed in to change notification settings - Fork 174
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
Connection string parsing errors incorrectly reported as "PG::UnableToSend: no connection to the server" #302
Comments
Thank you for the detailed description of the issue. I'll look at it. |
I submitted a patch to libpq, that fixes the issue: https://www.postgresql.org/message-id/a9b4cbd7-4ecb-06b2-ebd7-1739bbff3217%40greiz-reinsdorf.de |
Oh that's amazing, thank you :-) (The fix being in libpq also means we can pick it up without needing to wait for customers to update their app's pg gem, which really helps) |
This is fixed in libpq and will be part of PostgreSQL-12.1: postgres/postgres@ba19a6b |
@larskanis Many thanks! |
Hi!
libpq
's parsing of integer connection string parameters (such asconnect_timeout
) was made more strict in PostgreSQL 12:postgres/postgres@e7a2217
However these new variants of error messages are not surfaced correctly by
ruby-pg
, which instead reportsPG::UnableToSend: no connection to the server
, making debugging harder.STR
Install Docker and docker-compose
Create the following files:
docker-compose run testcase
docker-compose down
Expected
That the
docker-compose run testcase
fail with an error message that makes it clear that the connection parameters were incorrect. For example the original libpq error (that doesn't get propagated itself) says:invalid integer value "15s" for keyword "connect_timeout"
Actual
The text was updated successfully, but these errors were encountered: