-
Notifications
You must be signed in to change notification settings - Fork 435
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
During reload pgbouncer throws error "unexpected response from login query" #220
Comments
Hi, It is not the same issue of #161 and I have been able to reproduce it on my machine while I was dumping the connection with tcpdump. The issue is that, after a reload, the backend could send some ParameterStatus messages together with the login query response. here is my tcpdump output:
As you can see after a reload some parameter have changed and postgres notified the client about it, but that confuses the login query. I think that we could simply ignore that messages with the following patch: diff --git a/src/client.c b/src/client.c
index 2a46e0d..dfe856b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -374,6 +374,8 @@ bool handle_auth_response(PgSocket *client, PktHdr *pkt) {
break;
case '2': /* BindComplete */
break;
+ case 'S': /* ParameterStatus */
+ break;
case 'Z': /* ReadyForQuery */
sbuf_prepare_skip(&client->link->sbuf, pkt->len);
if (!client->auth_user) { |
@mnencia Sounds about right (the ParameterStatus was processed already so we should just ignore it as you say). Wanna turn the patch into pull request? |
I've created a pull request. |
Merged, thanks |
Changes since 1.9.0 2019-07-01 - PgBouncer 1.10.0 - "Afraid of the World" Features Add support for enabling and disabling TLS 1.3. (TLS 1.3 was already supported, depending on the OpenSSL library, but now the configuration settings to pick the TLS protocol versions also support it.) Fixes Fix TLS 1.3 support. This was broken with OpenSSL 1.1.1 and 1.1.1a (but not before or after). Fix a rare crash in SHOW FDS (pgbouncer/pgbouncer#311). Fix an issue that could lead to prolonged downtime if many cancel requests arrive (pgbouncer/pgbouncer#329). Avoid "unexpected response from login query" after a postgres reload (pgbouncer/pgbouncer#220). Fix idle_transaction_timeout calculation (pgbouncer/pgbouncer#125). The bug would lead to premature timeouts in specific situations. Cleanups Make various log and error messages more precise. Fix issues found by Coverity (none had a significant impact in practice). Improve and document all test scripts. Add additional SHOW commands to the documentation. Convert the documentation from rst to Markdown. Python scripts in the source tree are all compatible with Python 3 now.
When reloading Postgres with SIGHUP to reload the config file, if a new connection from pgbouncer to postgres is initiated during the reload, then pgbouncer throws an error "unexpected response from login query".
No other database client has an issue connecting during this period and no connections are disconnected.
The text was updated successfully, but these errors were encountered: