I've noticed since upgrading from pgBouncer 1.17 to 1.18 (but not otherwise changing my configuration) that canceled queries result in a fatal error that crashes the service, i.e.
2023-02-23 03:29:32.097 UTC [27246] LOG started sending cancel request
2023-02-23 03:29:32.098 UTC [27246] FATAL @src/server.c:583 in function server_proto(): server_proto: server in bad state: 14
I can recreate this by connecting to pgBouncer via psql
, running a long query, and issuing a cancellation request.
My pgbouncer.ini file is below. There haven't been any changes to it between the upgrade from 1.17 to 1.18.
[databases]
%include /etc/pgbouncer/hosts.ini
[users]
[pgbouncer]
syslog = 1
ignore_startup_parameters = extra_float_digits ssl_renegotiation_limit
logfile = /var/log/postgresql/pgbouncer.log
pidfile = /var/run/postgresql/pgbouncer.pid
listen_addr = *
listen_port = 6432
unix_socket_dir = /var/run/postgresql
client_tls_sslmode=allow
client_tls_key_file = /etc/letsencrypt/live/x/privkey.pem
client_tls_cert_file = /etc/letsencrypt/live/x/fullchain.pem
server_tls_sslmode = verify-ca
server_tls_ca_file = /etc/azure.postgresql.pem
auth_type = plain
auth_file = /etc/pgbouncer/userlist.txt
admin_users = swpgbouncer
pool_mode = transaction
max_client_conn = 995
default_pool_size = 20
I can't find anything in the 1.18 changelog that would cause this -- is there something else I'm missing?
Update Here is some additional info:
- pgBouncer 1.18 is running on an Ubuntu 18.04.6 LTS virtual machine
- Postgres is version 11 on an Azure Database for PostgreSQL single server