From 9bff5cae90c5c081c0a3044392362a49052782f2 Mon Sep 17 00:00:00 2001 From: cpatru Date: Wed, 14 Sep 2016 18:17:40 +0100 Subject: [PATCH] Don't send ReadyForQuery on main_connection as it may cause clients to get out of sync. --- src/admin.c | 7 ------- src/objects.c | 6 ------ 2 files changed, 13 deletions(-) diff --git a/src/admin.c b/src/admin.c index 35bb898..113e6cd 100644 --- a/src/admin.c +++ b/src/admin.c @@ -1529,18 +1529,11 @@ void admin_pause_done(void) /* admin on console has pressed ^C */ void admin_handle_cancel(PgSocket *admin) { - bool res; - /* weird, but no reason to fail */ if (!admin->wait_for_response) slog_warning(admin, "admin cancel request for non-waiting client?"); if (cf_pause_mode != P_NONE) full_resume(); - - /* notify readiness */ - SEND_ReadyForQuery(res, admin); - if (!res) - disconnect_client(admin, false, "readiness send failed"); } diff --git a/src/objects.c b/src/objects.c index b1ad273..1606373 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1280,8 +1280,6 @@ found: /* not linked client, just drop it then */ if (!main_client->link) { - bool res; - /* let administrative cancel be handled elsewhere */ if (main_client->pool->db->admin) { disconnect_client(req, false, "cancel request for console client"); @@ -1291,10 +1289,6 @@ found: disconnect_client(req, false, "cancel request for idle client"); - /* notify readiness */ - SEND_ReadyForQuery(res, main_client); - if (!res) - disconnect_client(main_client, true, "ReadyForQuery for main_client failed"); return; } -- 2.40.0