Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not wait server_login_retry for next connect if cancellation succeeds #329
If postgres restarts while there are N cancellations in the queue, pgbouncer is currently unavailable for at least N*
This changes fixes the issue by introducing a
If postgres restarts while there are N cancellations in the queue, pgbouncer is currently unavailable for at least N*server_login_retry because it uses every new connection for one queued cancellation and then waits server_login_retry before opening a new connection because the last_connect_failed flag is still set to 1. This can lead to prolonged downtime. This changes fixes the issue by introducing a last_login_failed flag. The last_connect_failed is now reset when a cancellation succeeds, such that launch_new_connection no longer waits if pgbouncer manages to connect, but has queued cancellations. The last_login_failed flag has the same semantics as the last_connect_failed flag had previously, such that check_fast_fail still rejects connections when there are no servers available and the last login failed.
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.