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:19:10 +0000 (18:19 +0200)
commit7b96bf445a42b1cb2a435854f9825c38253f79a2
tree0b1e3fd14f085d51b89da94f600ffc3ae3410d61
parentcca705a5d93446e1a9c775b94c7d5900986c0488
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