mirror of https://github.com/sysown/proxysql
Bug Description: ProxySQL would deadlock when processing extended query frames where: 1. Many Close Statement messages accumulate responses in PSarrayOUT 2. Total response size exceeds pgsql-threshold_resultset_size 3. A backend operation (Describe/Execute) follows in the same frame Root Cause: - Close Statement operations are handled locally by ProxySQL (no backend routing) - Their CloseComplete responses accumulate in PSarrayOUT - When threshold_resultset_size is exceeded, ProxySQL stops reading from backend - Subsequent backend operations (Describe/Execute) need backend responses to complete - This creates a deadlock: ProxySQL won't read, backend operation can't complete - Extended query frame never finishes, query times out The Fix: When PSarrayOUT exceeds threshold_resultset_size and a backend operation is pending, ProxySQL now flushes all accumulated data in PSarrayOUT to the client first, then continues processing backend operations. This breaks the deadlock by clearing the buffer before attempting to read more data from the backend.pull/5301/head
parent
7e9e00997d
commit
9ec045ca74
Loading…
Reference in new issue