pgsql: Fix out-of-memory error handling in ParameterDescription message - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix out-of-memory error handling in ParameterDescription message
Date
Msg-id E1a8WQ7-0001VN-SA@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1e23caae30f5f7c841aa50eaa99b0145576e520b

Modified Files
--------------
src/interfaces/libpq/fe-protocol3.c |   64 +++++++++++++++++++++++++++++------
1 file changed, 53 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix out-of-memory error handling in ParameterDescription message
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix out-of-memory error handling in ParameterDescription message