]> granicus.if.org Git - postgresql/commit
Fix out-of-memory error handling in ParameterDescription message processing.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 14 Dec 2015 16:19:10 +0000 (18:19 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 14 Dec 2015 16:41:11 +0000 (18:41 +0200)
commit1e23caae30f5f7c841aa50eaa99b0145576e520b
tree7942116732260ec71f1a32aeca09b890d6974fee
parentea3f30cf69f44ba7c37e0cccfb0aa74d82c98e54
Fix out-of-memory error handling in ParameterDescription message processing.

If libpq ran out of memory while constructing the result set, it would hang,
waiting for more data from the server, which might never arrive. To fix,
distinguish between out-of-memory error and not-enough-data cases, and give
a proper error message back to the client on OOM.

There are still similar issues in handling COPY start messages, but let's
handle that as a separate patch.

Michael Paquier, Amit Kapila and me. Backpatch to all supported versions.
src/interfaces/libpq/fe-protocol3.c