You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 98811b1
Browse filesBrowse the repository at this point in the historyBrowse files
pgsql: decide the NoData of a refused DISCARD ALL by the connection
A DISCARD ALL in a transaction is forwarded to the backend. On a libpq
connection the Describe folded into the Execute is not sent on, so ProxySQL
sends the NoData itself. That was decided by the global
pgsql-use_native_backend_protocol setting. A pooled connection keeps the
protocol it was opened with, so after the setting changed the NoData was
missing or doubled.
It is now decided by the connection the statement goes to.
pgsql-discard_all_txn_block-t gets a check for this: a backend opened under
the other protocol, the setting flipped without flushing the pool, then an
extended DISCARD ALL in a transaction compared with direct PostgreSQL. It
fails without this change.
ok(same, "mixed pool: DISCARD ALL in a transaction, extended protocol, on a backend opened under the other protocol [%s]: identical to direct PostgreSQL%s%s",
927
+
MODE_NAME[mode], same ? "" : " -- ", same ? "" : why.c_str());
928
+
// Put the pool and the setting back for the parity cases.
929
+
if (!setNativeMode(admin, native) || !flushBackendPool(admin, BACKEND_HG, saved_servers)) {
930
+
cleanup();
931
+
BAIL_OUT("cannot reset the pool after the mixed case");
932
+
}
933
+
}
934
+
899
935
// ---- parity cases: the proxy's bytes must be PostgreSQL's bytes ------
0 commit comments