]> granicus.if.org Git - pgbouncer/commitdiff
Avoid 'unexpected response from login query' after a postgres reload
authorMarco Nenciarini <marco.nenciarini@2ndquadrant.it>
Fri, 28 Dec 2018 19:06:58 +0000 (20:06 +0100)
committerMarco Nenciarini <marco.nenciarini@2ndquadrant.it>
Sat, 29 Dec 2018 08:58:24 +0000 (09:58 +0100)
After a PostgreSQL reload, the backend could inform the frontend about
configuration changes by sending some ParameterStatus messages
together with the usual login query response. These messages can be
safely ignored in the login query response handler.

Closes: #220
src/client.c

index 2a46e0d7c7a181ae4aef8e8c961af8131709af39..dfe856b72b819d9c9f40df0504f49f6f320887b7 100644 (file)
@@ -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) {