This is an en-bug in 3.6.1.
If an extend query appears right after a close message, do_query() is
called to check system catalogs, it hangs because it expects to read
pending data. This is caused by being mistakenly set the pending flag
after Close().
Back patch to 3.6-stable and 3.5-stable.
ereport(ERROR,
(errmsg("pool_set_pending_response: session context is not initialized")));
+ ereport(DEBUG1,
+ (errmsg("pool_set_pending_response")));
+
session_context->is_pending_response = true;
}
ereport(ERROR,
(errmsg("pool_unset_pending_response: session context is not initialized")));
+ ereport(DEBUG1,
+ (errmsg("pool_unset_pending_response")));
+
session_context->is_pending_response = false;
}
pmsg = pool_pending_messages_create('C', len, contents);
pool_pending_message_add(pmsg);
pool_unset_query_in_progress();
+ /*
+ * Remeber that we send flush or sync message to backend.
+ */
+ pool_unset_pending_response();
}
return POOL_CONTINUE;
if (!pool_is_query_in_progress() && !pool_is_ignore_till_sync())
pool_set_query_in_progress();
status = Close(frontend, backend, len, contents);
- pool_set_pending_response();
break;
case 'D': /* Describe */