Fix out-of-memory error handling in ParameterDescription message processing.
authorHeikki Linnakangas <[email protected]>
Mon, 14 Dec 2015 16:19:10 +0000 (18:19 +0200)
committerHeikki Linnakangas <[email protected]>
Mon, 14 Dec 2015 16:24:58 +0000 (18:24 +0200)
commit34d136f92ac65c4ed8ede9459217ef900d603f97
tree9c81ae802edc6a0191964fffdca7f79a2c007a41
parentccde00b9b97ed8b7307e39f95bd48922bf955bb2
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